aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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,