add null-pointer check
This commit is contained in:
parent
39e5fa6ae8
commit
e29f62f0a7
@ -45,7 +45,8 @@ hash_element_dtor(void *user, void *element)
|
||||
if(e->key)
|
||||
free(e->key);
|
||||
|
||||
h->dtor(e->ptr);
|
||||
if(e->ptr)
|
||||
h->dtor(e->ptr);
|
||||
|
||||
free(e);
|
||||
}
|
||||
|
@ -85,7 +85,8 @@
|
||||
*/
|
||||
void Curl_freeaddrinfo(Curl_addrinfo *p)
|
||||
{
|
||||
freeaddrinfo(p);
|
||||
if(p)
|
||||
freeaddrinfo(p);
|
||||
}
|
||||
|
||||
#ifdef CURLRES_ASYNCH
|
||||
|
Loading…
Reference in New Issue
Block a user