From: Emil Engler Date: Wed, 16 Sep 2020 19:33:27 +0000 (+0200) Subject: urlapi: use more Curl_safefree X-Git-Tag: curl-7_73_0~88 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c0f0e400e0bc43cbe8c42c6937ed0ac743a8d81a;p=thirdparty%2Fcurl.git urlapi: use more Curl_safefree Closes #5968 --- diff --git a/lib/urlapi.c b/lib/urlapi.c index acbfb82875..88b7f042f4 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;