]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
smtp:Fixed memory leak from commit dac01ff6d788b2
authorSteve Holme <steve_holme@hotmail.com>
Sun, 17 Nov 2013 09:00:21 +0000 (09:00 +0000)
committerSteve Holme <steve_holme@hotmail.com>
Sun, 17 Nov 2013 09:00:21 +0000 (09:00 +0000)
The buffer allocated by smtp_parse_custom_request() was not freed.

lib/smtp.c

index 04fe76dd82ce29f6f93a69160b2588958478a5ea..120afaf80633f1c302092d9991fc22cd6c4992b1 100644 (file)
@@ -1710,6 +1710,9 @@ static CURLcode smtp_done(struct connectdata *conn, CURLcode status,
     result = smtp_block_statemach(conn);
   }
 
+  /* Cleanup our per-request based variables */
+  Curl_safefree(smtp->custom);
+
   /* Clear the transfer mode for the next request */
   smtp->transfer = FTPTRANSFER_BODY;