From 048690a34d0fa89bd128ac21d1a4c84b4703a3de Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Thu, 13 Aug 2009 02:11:20 +0000 Subject: [PATCH] 2646. [bug] Incorrect cleanup on error in socket.c. [RT #19987] --- CHANGES | 2 ++ lib/isc/unix/socket.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 90a00ace7f..d1674f65c0 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,5 @@ +2646. [bug] Incorrect cleanup on error in socket.c. [RT #19987] + 2645. [port] "gcc -m32" didn't work on amd64 and x86_64 platforms which default to 64 bits. [RT #19927] diff --git a/lib/isc/unix/socket.c b/lib/isc/unix/socket.c index 4955b78656..df1002ab02 100644 --- a/lib/isc/unix/socket.c +++ b/lib/isc/unix/socket.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: socket.c,v 1.318 2009/04/18 01:28:17 jinmei Exp $ */ +/* $Id: socket.c,v 1.319 2009/08/13 02:11:20 marka Exp $ */ /*! \file */ @@ -3659,7 +3659,7 @@ setup_watcher(isc_mem_t *mctx, isc_socketmgr_t *manager) { manager->maxsocks); if (manager->fdpollinfo == NULL) { isc_mem_put(mctx, manager->events, - sizeof(pollinfo_t) * manager->maxsocks); + sizeof(struct pollfd) * manager->nevents); return (ISC_R_NOMEMORY); } memset(manager->fdpollinfo, 0, sizeof(pollinfo_t) * manager->maxsocks);