From: Mark Andrews Date: Mon, 28 Feb 2011 12:48:30 +0000 (+0000) Subject: 3044. [bug] Hold the socket manager lock while freeing the socket. X-Git-Tag: v9.9.0a1~675 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=d3e3d7846dd5895960dcdcb1012b4be23388f81c;p=thirdparty%2Fbind9.git 3044. [bug] Hold the socket manager lock while freeing the socket. [RT #23333] --- diff --git a/CHANGES b/CHANGES index 23bb758751f..dbc18a037a8 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +3044. [bug] Hold the socket manager lock while freeing the socket. + [RT #23333] + 3043. [test] Merged in the NetBSD ATF test framework (currently version 0.12) for development of future unit tests. Use configure --with-atf to build ATF internally diff --git a/lib/isc/unix/socket.c b/lib/isc/unix/socket.c index fd9d141a33c..0f1ac4f6ac6 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.336 2011/02/18 04:19:05 marka Exp $ */ +/* $Id: socket.c,v 1.337 2011/02/28 12:48:30 marka Exp $ */ /*! \file */ @@ -1997,9 +1997,10 @@ destroy(isc__socket_t **sockp) { SIGNAL(&manager->shutdown_ok); #endif /* USE_WATCHER_THREAD */ - UNLOCK(&manager->lock); - + /* can't unlock manager as its memory context is still used */ free_socket(sockp); + + UNLOCK(&manager->lock); } static isc_result_t