From 0f4a03cbb6fdb84d05cb6aafe50444edad4f4119 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 16 Mar 2015 15:01:15 +0100 Subject: 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. --- lib/http2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/http2.c') diff --git a/lib/http2.c b/lib/http2.c index ea20b0a11..66a0adbc0 100644 --- a/lib/http2.c +++ b/lib/http2.c @@ -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; -- cgit v1.2.3