aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2011-10-07 20:50:57 +0200
committerYang Tse <yangsita@gmail.com>2011-10-07 20:50:57 +0200
commit17f48fe87979f159e2d8769d678641c60f4c0eed (patch)
tree322c1d34d9c8d0a4d203d127765818f297ac93c7 /src
parentb82bd05354cfa756a013d2bed4ffdc951ce903db (diff)
libcurl: some OOM handling fixes
Diffstat (limited to 'src')
-rw-r--r--src/tool_doswin.c4
-rw-r--r--src/tool_operate.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/tool_doswin.c b/src/tool_doswin.c
index b45522b53..b23b50af1 100644
--- a/src/tool_doswin.c
+++ b/src/tool_doswin.c
@@ -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;
diff --git a/src/tool_operate.c b/src/tool_operate.c
index 3ee1d10d2..481116ddf 100644
--- a/src/tool_operate.c
+++ b/src/tool_operate.c
@@ -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;