mirror of
https://github.com/libevent/libevent.git
synced 2025-01-09 00:56:20 +08:00
Handle calloc failure in evdns. (Found by Dave Hart)
This commit is contained in:
parent
dde3b73963
commit
364291e9a9
6
evdns.c
6
evdns.c
@ -794,6 +794,12 @@ reply_schedule_callback(struct request *const req, u32 ttl, u32 err, struct repl
|
||||
{
|
||||
struct deferred_reply_callback *d = mm_calloc(1, sizeof(*d));
|
||||
|
||||
if (!d) {
|
||||
event_warn("%s: Couldn't allocate space for deferred callback.",
|
||||
__func__);
|
||||
return;
|
||||
}
|
||||
|
||||
ASSERT_LOCKED(req->base);
|
||||
|
||||
d->request_type = req->request_type;
|
||||
|
Loading…
x
Reference in New Issue
Block a user