Skip to content

Commit

Permalink
get_url_file_name: Fixed crash on OOM on debug build
Browse files Browse the repository at this point in the history
This caused a null-pointer dereference which caused a few dozen
torture tests to fail.
  • Loading branch information
dfandrich committed Dec 7, 2014
1 parent f5e9c63 commit e05de4f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/tool_operhlp.c
Expand Up @@ -164,6 +164,8 @@ CURLcode get_url_file_name(char **filename, const char *url)
Curl_safefree(*filename);
*filename = strdup(buffer); /* clone the buffer */
curl_free(tdir);
if(!*filename)
return CURLE_OUT_OF_MEMORY;
}
}
#endif
Expand Down

0 comments on commit e05de4f

Please sign in to comment.