summaryrefslogtreecommitdiff
path: root/src/plugins/irc/irc-sasl.c
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2019-04-12 21:29:39 +0200
committerSébastien Helleu <flashcode@flashtux.org>2019-04-13 08:42:45 +0200
commit3d95217745cd269e6911a0830f7e6cc515828f07 (patch)
tree7cc372d8874c2d994c444199360c040778c3e153 /src/plugins/irc/irc-sasl.c
parentc80dc2a5ca93045ed7c358a8860532aab72f0c89 (diff)
downloadweechat-3d95217745cd269e6911a0830f7e6cc515828f07.zip
api: return allocated string in hook_info callback and function info_get
Diffstat (limited to 'src/plugins/irc/irc-sasl.c')
-rw-r--r--src/plugins/irc/irc-sasl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/irc/irc-sasl.c b/src/plugins/irc/irc-sasl.c
index 7cfc1ed29..f3074480d 100644
--- a/src/plugins/irc/irc-sasl.c
+++ b/src/plugins/irc/irc-sasl.c
@@ -96,8 +96,7 @@ irc_sasl_mechanism_plain (const char *sasl_username, const char *sasl_password)
char *
irc_sasl_get_key_content (struct t_irc_server *server, const char *sasl_key)
{
- const char *weechat_dir;
- char *key_path1, *key_path2, *content;
+ char *weechat_dir, *key_path1, *key_path2, *content;
if (!sasl_key)
return NULL;
@@ -122,6 +121,8 @@ irc_sasl_get_key_content (struct t_irc_server *server, const char *sasl_key)
(key_path2) ? key_path2 : ((key_path1) ? key_path1 : sasl_key));
}
+ if (weechat_dir)
+ free (weechat_dir);
if (key_path1)
free (key_path1);
if (key_path2)