diff --git a/CHANGES b/CHANGES index f39fa4ac43..0999f2f118 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 7fd49ae343..9878d5a4c9 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.308.12.17 2010/12/22 03:28:13 marka Exp $ */ +/* $Id: socket.c,v 1.308.12.18 2011/02/28 12:54:54 marka Exp $ */ /*! \file */ @@ -1833,9 +1833,10 @@ destroy(isc_socket_t **sockp) { SIGNAL(&manager->shutdown_ok); #endif /* ISC_PLATFORM_USETHREADS */ - UNLOCK(&manager->lock); - + /* can't unlock manager as its memory context is still used */ free_socket(sockp); + + UNLOCK(&manager->lock); } static isc_result_t