]> granicus.if.org Git - neomutt/commitdiff
fix inappropriate use of FREE() in ssl init error path
authorOswald Buddenhagen <ossi@kde.org>
Sun, 6 Jan 2013 18:24:18 +0000 (19:24 +0100)
committerRichard Russon <rich@flatcap.org>
Tue, 29 May 2018 02:01:19 +0000 (03:01 +0100)
OpenSSL structures need to be freed with dedicated functions.

conn/ssl.c

index ff59dbe58fc2a0cdb101ccb584682b68a8507c75..01d5e273a4a0693d481d89043157a759a7bad3b9 100644 (file)
@@ -1376,9 +1376,11 @@ static int ssl_setup(struct Connection *conn)
   return 0;
 
 free_ssl:
-  FREE(&ssldata->ssl);
+  SSL_free (ssldata->ssl);
+  ssldata->ssl = 0;
 free_ctx:
-  FREE(&ssldata->ctx);
+  SSL_CTX_free (ssldata->ctx);
+  ssldata->ctx = 0;
 free_sasldata:
   FREE(&ssldata);