]> granicus.if.org Git - curl/commitdiff
krb5: fix memory leak in krb_auth
authorDaniel Gustafsson <daniel@yesql.se>
Thu, 13 Sep 2018 08:10:55 +0000 (10:10 +0200)
committerDaniel Gustafsson <daniel@yesql.se>
Thu, 13 Sep 2018 08:10:55 +0000 (10:10 +0200)
The FTP command allocated by aprintf() must be freed after usage.

Reviewed-by: Daniel Stenberg <daniel@haxx.se>
lib/krb5.c

index 8b5a24720d5beb70c8d593cd1d64cfa690302de5..46c56085bb0e462f44b1cf86a489e9aad6d6a2c8 100644 (file)
@@ -265,6 +265,7 @@ krb5_auth(void *app_data, struct connectdata *conn)
           result = CURLE_OUT_OF_MEMORY;
 
         free(p);
+        free(cmd);
 
         if(result) {
           ret = -2;