diff --git a/lib/share.c b/lib/share.c index 7fb068625..17202486c 100644 --- a/lib/share.c +++ b/lib/share.c @@ -35,12 +35,13 @@ CURLSH * curl_share_init(void) { struct Curl_share *share = calloc(1, sizeof(struct Curl_share)); - if(share) + if(share) { share->specifier |= (1<hostcache)) { - free(share); - return NULL; + if(Curl_mk_dnscache(&share->hostcache)) { + free(share); + return NULL; + } } return share;