]> granicus.if.org Git - neomutt/commitdiff
fix: memory leak in mutt_smtp_send()
authorRichard Russon <rich@flatcap.org>
Thu, 22 Aug 2019 21:39:51 +0000 (22:39 +0100)
committerRichard Russon <rich@flatcap.org>
Fri, 23 Aug 2019 13:01:53 +0000 (14:01 +0100)
Free the Connection after sending the Email.

smtp.c

diff --git a/smtp.c b/smtp.c
index 0fc805d3f912e8d4b11e4fc14184c22c724d757c..ae46a2ea42b7ebae2a6acd39963885671a399acf 100644 (file)
--- a/smtp.c
+++ b/smtp.c
@@ -813,6 +813,7 @@ int mutt_smtp_send(const struct AddressList *from, const struct AddressList *to,
   } while (false);
 
   mutt_socket_close(conn);
+  FREE(&conn);
 
   if (rc == SMTP_ERR_READ)
     mutt_error(_("SMTP session failed: read error"));