diff options
author | Dan Fandrich <dan@coneharvesters.com> | 2014-12-07 11:08:10 +0100 |
---|---|---|
committer | Dan Fandrich <dan@coneharvesters.com> | 2014-12-07 11:09:14 +0100 |
commit | e05de4f46db67696376f16b1627a2b3701314b20 (patch) | |
tree | 5cf538576dbb5e9b17b4dbe2faadb1a8b9e8784c /src | |
parent | f5e9c636e83b8808d6b278fbcd5e1a082b1403c5 (diff) |
get_url_file_name: Fixed crash on OOM on debug build
This caused a null-pointer dereference which caused a few dozen
torture tests to fail.
Diffstat (limited to 'src')
-rw-r--r-- | src/tool_operhlp.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/tool_operhlp.c b/src/tool_operhlp.c index 7a6ed2015..abf949617 100644 --- a/src/tool_operhlp.c +++ b/src/tool_operhlp.c @@ -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 |