summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2006-10-26 11:15:25 +0000
committerYang Tse <yangsita@gmail.com>2006-10-26 11:15:25 +0000
commit012d7e28789cf6299c16beb1a95710a95ea97258 (patch)
tree7cabfb74906f91f678bd9a53d202152e9d652d79
parentcd3029f36f762c81313a5750bed7a5d80b11ffee (diff)
downloadgnurl-012d7e28789cf6299c16beb1a95710a95ea97258.tar.gz
gnurl-012d7e28789cf6299c16beb1a95710a95ea97258.tar.bz2
gnurl-012d7e28789cf6299c16beb1a95710a95ea97258.zip
Fix Curl_open() not reporting failure when allocation of the
buffer used to store headers in the SessionHandle failed.
-rw-r--r--lib/url.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/url.c b/lib/url.c
index abbcafa04..03a0b6edd 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -564,9 +564,10 @@ CURLcode Curl_open(struct SessionHandle **curl)
free(data);
data = NULL;
}
+ else
+ *curl = data;
- *curl = data;
- return CURLE_OK;
+ return res;
}
CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,