aboutsummaryrefslogtreecommitdiff
path: root/lib/curl_multibyte.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/curl_multibyte.c')
-rw-r--r--lib/curl_multibyte.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/curl_multibyte.c b/lib/curl_multibyte.c
index 761cadda7..403d00537 100644
--- a/lib/curl_multibyte.c
+++ b/lib/curl_multibyte.c
@@ -47,7 +47,8 @@ wchar_t *Curl_convert_UTF8_to_wchar(const char *str_utf8)
if(str_w) {
if(MultiByteToWideChar(CP_UTF8, 0, str_utf8, -1, str_w,
str_w_len) == 0) {
- Curl_safefree(str_w);
+ free(str_w);
+ return NULL;
}
}
}
@@ -68,7 +69,8 @@ char *Curl_convert_wchar_to_UTF8(const wchar_t *str_w)
if(str_utf8) {
if(WideCharToMultiByte(CP_UTF8, 0, str_w, -1, str_utf8, str_utf8_len,
NULL, FALSE) == 0) {
- Curl_safefree(str_utf8);
+ free(str_utf8);
+ return NULL;
}
}
}