summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmil Engler <me@emilengler.com>2020-09-16 21:33:27 +0200
committerDaniel Stenberg <daniel@haxx.se>2020-09-17 09:44:36 +0200
commitc0f0e400e0bc43cbe8c42c6937ed0ac743a8d81a (patch)
treef67b7ea6a9bbb863ec6ce5028f25935d1a152224
parent1060955a617dceddeccf6ba1505fe92df317d40b (diff)
downloadcurl-c0f0e400e0bc43cbe8c42c6937ed0ac743a8d81a.tar.gz
urlapi: use more Curl_safefree
Closes #5968
-rw-r--r--lib/urlapi.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/urlapi.c b/lib/urlapi.c
index acbfb8287..88b7f042f 100644
--- a/lib/urlapi.c
+++ b/lib/urlapi.c
@@ -1255,8 +1255,7 @@ CURLUcode curl_url_set(CURLU *u, CURLUPart what,
return CURLUE_UNKNOWN_PART;
}
if(storep && *storep) {
- free(*storep);
- *storep = NULL;
+ Curl_safefree(*storep);
}
return CURLUE_OK;
}
@@ -1284,8 +1283,7 @@ CURLUcode curl_url_set(CURLU *u, CURLUPart what,
break;
case CURLUPART_HOST:
storep = &u->host;
- free(u->zoneid);
- u->zoneid = NULL;
+ Curl_safefree(u->zoneid);
break;
case CURLUPART_ZONEID:
storep = &u->zoneid;