mirror of
https://github.com/libevent/libevent.git
synced 2025-01-09 00:56:20 +08:00
Avoid a free(NULL) if out-of-memory in evdns_getaddrinfo. Found by Dave Hart
This commit is contained in:
parent
1a21d7b840
commit
3417f6808d
3
evdns.c
3
evdns.c
@ -4310,7 +4310,8 @@ evdns_getaddrinfo_gotresolve(int result, char type, int count,
|
||||
evdns_cancel_request(NULL, other_req->r);
|
||||
}
|
||||
data->user_cb(EVUTIL_EAI_MEMORY, NULL, data->user_data);
|
||||
evutil_freeaddrinfo(res);
|
||||
if (res)
|
||||
evutil_freeaddrinfo(res);
|
||||
|
||||
if (other_req->r == NULL)
|
||||
free_getaddrinfo_request(data);
|
||||
|
Loading…
x
Reference in New Issue
Block a user