1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-23 08:38:49 -05:00

lib1557: fix mem-leak in OOM

Closes #4709
This commit is contained in:
Daniel Stenberg 2019-12-12 15:08:19 +01:00
parent 5dc56eb95d
commit 6a15d1d4e5
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@ -49,13 +49,13 @@ int test(char *URL)
multi_perform(curlm, &running_handles);
multi_remove_handle(curlm, curl2);
curl_easy_cleanup(curl2);
/* If curl2 is still in the connect-pending list, this will crash */
multi_remove_handle(curlm, curl1);
curl_easy_cleanup(curl1);
test_cleanup:
curl_easy_cleanup(curl1);
curl_easy_cleanup(curl2);
curl_multi_cleanup(curlm);
curl_global_cleanup();
return res;