summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;