mirror of
https://github.com/curl/curl.git
synced 2026-07-27 23:53:06 +03:00
libcurl: some OOM handling fixes
This commit is contained in:
parent
b82bd05354
commit
17f48fe879
13 changed files with 118 additions and 52 deletions
|
|
@ -109,7 +109,7 @@ char *sanitize_dos_name(char *file_name)
|
|||
|
||||
strcpy(new_name, msdosify(file_name));
|
||||
|
||||
free(file_name);
|
||||
Curl_safefree(file_name);
|
||||
|
||||
return strdup(rename_if_dos_device_name(new_name));
|
||||
}
|
||||
|
|
@ -288,7 +288,7 @@ CURLcode FindWin32CACert(struct Configurable *config, const char *bundle_file)
|
|||
else
|
||||
result = CURLE_SSL_CACERT;
|
||||
|
||||
free(buf);
|
||||
Curl_safefree(buf);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
|
|
|||
|
|
@ -971,7 +971,7 @@ int operate(struct Configurable *config, int argc, argv_item_t argv[])
|
|||
/* libssh2 version older than 1.1.1 */
|
||||
res = CURLE_OK;
|
||||
}
|
||||
free(home);
|
||||
Curl_safefree(home);
|
||||
}
|
||||
if(res)
|
||||
goto show_error;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue