From f4dda9cf28f8be880097ee931b3237e09731a28a Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Sun, 11 Jan 2015 09:24:33 +1100 Subject: [PATCH] 4033. [bug] Missing out of memory check in request.c:req_send. [RT #38311] --- CHANGES | 3 +++ lib/dns/request.c | 2 ++ 2 files changed, 5 insertions(+) diff --git a/CHANGES b/CHANGES index be6f6961a8..882a14f464 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +4033. [bug] Missing out of memory check in request.c:req_send. + [RT #38311] + 4032. [bug] Built-in "empty" zones did not correctly inherit the "allow-transfer" ACL from the options or view. [RT #38310] diff --git a/lib/dns/request.c b/lib/dns/request.c index 72b8d51a87..98907fe6a6 100644 --- a/lib/dns/request.c +++ b/lib/dns/request.c @@ -444,6 +444,8 @@ req_send(dns_request_t *request, isc_task_t *task, isc_sockaddr_t *address) { sendevent = isc_socket_socketevent(request->mctx, socket, ISC_SOCKEVENT_SENDDONE, req_senddone, request); + if (sendevent == NULL) + return (ISC_R_NOMEMORY); if (request->dscp == -1) { sendevent->attributes &= ~ISC_SOCKEVENTATTR_DSCP; sendevent->dscp = 0;