diff --git a/CHANGES b/CHANGES index 23bb758751..dbc18a037a 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 fd9d141a33..0f1ac4f6ac 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