From: Yang Tse Date: Thu, 26 Oct 2006 11:15:25 +0000 (+0000) Subject: Fix Curl_open() not reporting failure when allocation of the X-Git-Tag: curl-7_16_0~18 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=012d7e28789cf6299c16beb1a95710a95ea97258;p=thirdparty%2Fcurl.git Fix Curl_open() not reporting failure when allocation of the buffer used to store headers in the SessionHandle failed. --- diff --git a/lib/url.c b/lib/url.c index abbcafa044..03a0b6edd6 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,