mirror of
https://github.com/curl/curl.git
synced 2024-11-27 05:50:21 +08:00
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.
This commit is contained in:
parent
f5e9c636e8
commit
e05de4f46d
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user