summaryrefslogtreecommitdiff
path: root/lib/share.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2021-12-10 12:54:17 +0100
committerDaniel Stenberg <daniel@haxx.se>2021-12-10 23:16:43 +0100
commit254f7bd78a1ab248329def2cbbbc983e7f6d2495 (patch)
treed1fd479896f6c3a666befa9e57b71252a1d91248 /lib/share.c
parente43ad4b47442c99c95f76675a17e608610231871 (diff)
downloadcurl-bagder/hash-lazyalloc.tar.gz
hash: lazy-alloc the table in Curl_hash_add()bagder/hash-lazyalloc
This makes Curl_hash_init() infallible which saves error paths. Closes #8132
Diffstat (limited to 'lib/share.c')
-rw-r--r--lib/share.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/share.c b/lib/share.c
index 9c43c8f70..403563fdd 100644
--- a/lib/share.c
+++ b/lib/share.c
@@ -39,11 +39,7 @@ curl_share_init(void)
if(share) {
share->magic = CURL_GOOD_SHARE;
share->specifier |= (1<<CURL_LOCK_DATA_SHARE);
-
- if(Curl_mk_dnscache(&share->hostcache)) {
- free(share);
- return NULL;
- }
+ Curl_init_dnscache(&share->hostcache);
}
return share;