From 012d7e28789cf6299c16beb1a95710a95ea97258 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Thu, 26 Oct 2006 11:15:25 +0000 Subject: Fix Curl_open() not reporting failure when allocation of the buffer used to store headers in the SessionHandle failed. --- lib/url.c | 5 +++-- 1 file 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, -- cgit v1.2.3