]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
smtp: free a temp resource
authorDaniel Stenberg <daniel@haxx.se>
Mon, 4 Mar 2024 09:07:07 +0000 (10:07 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 4 Mar 2024 21:44:55 +0000 (22:44 +0100)
The returned address needs to be freed.

Follow-up to e3905de8196d67b89df1602feb84c1f993211b20
Spotted by Coverity

Closes #13038

lib/smtp.c

index 605bb16eeb0221fb528fdaa9387b6d05204db017..a937fbf217c2e81579c8c12fcaf563f6dbc141f5 100644 (file)
@@ -677,6 +677,7 @@ static CURLcode smtp_perform_mail(struct Curl_easy *data)
         /* An invalid mailbox was provided but we'll simply let the server
            worry about it */
         auth = aprintf("<%s>", address);
+      free(address);
     }
     else
       /* Empty AUTH, RFC-2554, sect. 5 */