From: Dan Fandrich Date: Tue, 10 Apr 2007 00:38:41 +0000 (+0000) Subject: Fixed an out of memory handling issue. X-Git-Tag: curl-7_16_2~10 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=910ee13b20b622b9aa0c53025d86b19e9dcdf586;p=thirdparty%2Fcurl.git Fixed an out of memory handling issue. --- diff --git a/lib/http.c b/lib/http.c index 011f1141e9..8e4d322afc 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;