Fixed an out of memory handling issue.

This commit is contained in:
Dan Fandrich 2007-04-10 00:38:41 +00:00
parent 35935d71d2
commit 910ee13b20
1 changed files with 4 additions and 1 deletions

View File

@ -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;