aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/http.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/http.c b/lib/http.c
index 011f1141e..8e4d322af 100644
--- a/lib/http.c
+++ b/lib/http.c
@@ -1206,15 +1206,18 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn,
/* CRLF terminate the request */
result = add_bufferf(req_buffer, "\r\n");
- if(CURLE_OK == result)
+ if(CURLE_OK == result) {
/* Now send off the request */
result = add_buffer_send(req_buffer, conn,
&data->info.request_size, 0, sockindex);
+ req_buffer = NULL;
+ }
}
if(result)
failf(data, "Failed sending CONNECT to proxy");
}
free(host_port);
+ Curl_safefree(req_buffer);
if(result)
return result;