Avoid a free(NULL) if out-of-memory in evdns_getaddrinfo. Found by Dave Hart

This commit is contained in:
Nick Mathewson 2011-04-13 11:20:30 -04:00
parent 1a21d7b840
commit 3417f6808d

View File

@ -4310,6 +4310,7 @@ 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);
if (res)
evutil_freeaddrinfo(res);
if (other_req->r == NULL)