gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnurl] 175/282: smtp: fix memory leak on exit path


From: gnunet
Subject: [gnurl] 175/282: smtp: fix memory leak on exit path
Date: Wed, 01 Apr 2020 14:30:40 +0200

This is an automated email from the git hooks/post-receive script.

ng0 pushed a commit to branch master
in repository gnurl.

commit 81ade13c373c9569074e6f881fe9348123a7ed7c
Author: Daniel Stenberg <address@hidden>
AuthorDate: Thu Feb 27 14:37:40 2020 +0100

    smtp: fix memory leak on exit path
    
    Detected by Coverity. CID 1418139. "leaked_storage: Variable 'from'
    going out of scope leaks the storage it points to"
    
    Closes #4990
---
 lib/smtp.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/smtp.c b/lib/smtp.c
index 79499e6d4..77fcd5afc 100644
--- a/lib/smtp.c
+++ b/lib/smtp.c
@@ -612,8 +612,10 @@ static CURLcode smtp_perform_mail(struct connectdata *conn)
          converting the host name to an IDN A-label if necessary */
       result = smtp_parse_address(conn, data->set.str[STRING_MAIL_AUTH],
                                   &address, &host);
-      if(result)
+      if(result) {
+        free(from);
         return result;
+      }
 
       /* Establish whether we should report SMTPUTF8 to the server for this
          mailbox as per RFC-6531 sect. 3.1 point 4 and sect. 3.4 */

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]