summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2017-05-27 08:37:05 +0200
committerSébastien Helleu <flashcode@flashtux.org>2017-05-27 08:37:05 +0200
commita603c5e47632cbe71bbeff1bcfecd5614b789727 (patch)
treef0c1061f22b35ca28204b62a5a4e12e227c856da /src
parentb9fdcb01933512529b13a5e2adba78d6f0a54975 (diff)
downloadweechat-a603c5e47632cbe71bbeff1bcfecd5614b789727.zip
irc: fix memory leak in case of error in "ecdsa-nist256p-challenge" SASL mechanism
Diffstat (limited to 'src')
-rw-r--r--src/plugins/irc/irc-sasl.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/irc/irc-sasl.c b/src/plugins/irc/irc-sasl.c
index c4b3c3f45..3518cb98e 100644
--- a/src/plugins/irc/irc-sasl.c
+++ b/src/plugins/irc/irc-sasl.c
@@ -294,6 +294,9 @@ irc_sasl_mechanism_ecdsa_nist256p_challenge (struct t_irc_server *server,
free (string);
}
+ if (string)
+ free (string);
+
return answer_base64;
#else /* no gnutls or gnutls < 3.0.21 */