Skip to content

Commit

Permalink
fixup test 1400 memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
bagder committed Apr 26, 2019
1 parent da0c923 commit 80e712b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/tool_operate.c
Expand Up @@ -2140,8 +2140,11 @@ CURLcode operate(struct GlobalConfig *config, int argc, argv_item_t argv[])
size_t count = 0;
struct OperationConfig *operation = config->first;
CURLSH *share = curl_share_init();
if(!share)
if(!share) {
/* Cleanup the libcurl source output */
easysrc_cleanup();
return CURLE_OUT_OF_MEMORY;
}

curl_share_setopt(share, CURLSHOPT_SHARE, CURL_LOCK_DATA_COOKIE);
curl_share_setopt(share, CURLSHOPT_SHARE, CURL_LOCK_DATA_DNS);
Expand Down

0 comments on commit 80e712b

Please sign in to comment.