From 910ee13b20b622b9aa0c53025d86b19e9dcdf586 Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Tue, 10 Apr 2007 00:38:41 +0000 Subject: Fixed an out of memory handling issue. --- lib/http.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib') 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; -- cgit v1.2.3