projects
/
platform
/
upstream
/
curl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
862bb7b
)
http_proxy.c: fix OOM handling
author
Yang Tse
<yangsita@gmail.com>
Fri, 16 Mar 2012 19:11:22 +0000
(20:11 +0100)
committer
Yang Tse
<yangsita@gmail.com>
Fri, 16 Mar 2012 19:11:22 +0000
(20:11 +0100)
lib/http_proxy.c
patch
|
blob
|
history
diff --git
a/lib/http_proxy.c
b/lib/http_proxy.c
index
b12d370
..
e2d3869
100644
(file)
--- a/
lib/http_proxy.c
+++ b/
lib/http_proxy.c
@@
-128,12
+128,15
@@
CURLcode Curl_proxyCONNECT(struct connectdata *conn,
aprintf("%s%s%s:%hu", conn->bits.ipv6_ip?"[":"",
hostname, conn->bits.ipv6_ip?"]":"",
remote_port);
- if(!hostheader)
+ if(!hostheader) {
+ free(req_buffer);
return CURLE_OUT_OF_MEMORY;
+ }
if(!Curl_checkheaders(data, "Host:")) {
host = aprintf("Host: %s\r\n", hostheader);
if(!host) {
+ free(hostheader);
free(req_buffer);
return CURLE_OUT_OF_MEMORY;
}