mirror of
https://github.com/curl/curl.git
synced 2026-08-26 14:13:35 +03:00
if the global_init() is called from within curl_easy_init() and returns
an error code, we now make curl_easy_init fail and return NULL.
This commit is contained in:
parent
30e0891d3d
commit
256a16a8a3
1 changed files with 6 additions and 2 deletions
|
|
@ -198,8 +198,12 @@ CURL *curl_easy_init(void)
|
||||||
struct SessionHandle *data;
|
struct SessionHandle *data;
|
||||||
|
|
||||||
/* Make sure we inited the global SSL stuff */
|
/* Make sure we inited the global SSL stuff */
|
||||||
if (!initialized)
|
if (!initialized) {
|
||||||
curl_global_init(CURL_GLOBAL_DEFAULT);
|
res = curl_global_init(CURL_GLOBAL_DEFAULT);
|
||||||
|
if(res)
|
||||||
|
/* something in the global init failed, return nothing */
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
/* We use curl_open() with undefined URL so far */
|
/* We use curl_open() with undefined URL so far */
|
||||||
res = Curl_open(&data);
|
res = Curl_open(&data);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue