]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tool_operate: fix memory leak when SSL_CERT_DIR is used
authorDaniel Stenberg <daniel@haxx.se>
Wed, 2 Aug 2023 11:29:23 +0000 (13:29 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 2 Aug 2023 14:10:49 +0000 (16:10 +0200)
Detected by Coverity

Follow-up to 29bce9857a12b6cfa726a5

Closes #11577

src/tool_operate.c

index ca1313eeb8c09b2c9c6a472402022e38f60c7d11..2c7d88a71044ce67124601e95f168e704777661c 100644 (file)
@@ -2599,6 +2599,7 @@ static CURLcode transfer_per_config(struct GlobalConfig *global,
             errorf(global, "out of memory");
             return CURLE_OUT_OF_MEMORY;
           }
+          curl_free(env);
           capath_from_env = true;
         }
         env = curlx_getenv("SSL_CERT_FILE");