free: instead of Curl_safefree()
Since we just started make use of free(NULL) in order to simplify code, this change takes it a step further and: - converts lots of Curl_safefree() calls to good old free() - makes Curl_safefree() not check the pointer before free() The (new) rule of thumb is: if you really want a function call that frees a pointer and then assigns it to NULL, then use Curl_safefree(). But we will prefer just using free() from now on.
This commit is contained in:
@@ -212,7 +212,7 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn,
|
||||
failf(data, "Failed sending CONNECT to proxy");
|
||||
}
|
||||
|
||||
Curl_safefree(req_buffer);
|
||||
free(req_buffer);
|
||||
if(result)
|
||||
return result;
|
||||
|
||||
@@ -463,7 +463,7 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn,
|
||||
|
||||
result = Curl_http_input_auth(conn, proxy, auth);
|
||||
|
||||
Curl_safefree(auth);
|
||||
free(auth);
|
||||
|
||||
if(result)
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user