]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
Fix Curl_open() not reporting failure when allocation of the
authorYang Tse <yangsita@gmail.com>
Thu, 26 Oct 2006 11:15:25 +0000 (11:15 +0000)
committerYang Tse <yangsita@gmail.com>
Thu, 26 Oct 2006 11:15:25 +0000 (11:15 +0000)
buffer used to store headers in the SessionHandle failed.

lib/url.c

index abbcafa044fee03863b94420ae02ae6083a255ed..03a0b6edd609e27c0dad6de021200f575370238f 100644 (file)
--- 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,