mirror of
https://github.com/curl/curl.git
synced 2026-08-24 23:23:32 +03:00
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:
parent
9e661601fe
commit
0f4a03cbb6
35 changed files with 202 additions and 202 deletions
|
|
@ -669,7 +669,7 @@ CURLcode Curl_http2_request_upgrade(Curl_send_buffer *req,
|
|||
"Upgrade: %s\r\n"
|
||||
"HTTP2-Settings: %s\r\n",
|
||||
NGHTTP2_CLEARTEXT_PROTO_VERSION_ID, base64);
|
||||
Curl_safefree(base64);
|
||||
free(base64);
|
||||
|
||||
k->upgr101 = UPGR101_REQUESTED;
|
||||
|
||||
|
|
@ -945,7 +945,7 @@ static ssize_t http2_send(struct connectdata *conn, int sockindex,
|
|||
NULL, NULL);
|
||||
}
|
||||
|
||||
Curl_safefree(nva);
|
||||
free(nva);
|
||||
|
||||
if(stream_id < 0) {
|
||||
*err = CURLE_SEND_ERROR;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue