]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
3044. [bug] Hold the socket manager lock while freeing the socket.
authorMark Andrews <marka@isc.org>
Mon, 28 Feb 2011 12:51:28 +0000 (12:51 +0000)
committerMark Andrews <marka@isc.org>
Mon, 28 Feb 2011 12:51:28 +0000 (12:51 +0000)
                        [RT #23333]

CHANGES
lib/isc/unix/socket.c

diff --git a/CHANGES b/CHANGES
index 78cc0122afe4d64efd2b39cb07e570f9efac6b1e..66ae528563151d3c3cf0909f111369ce42e3647e 100644 (file)
--- 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
index 6c41422ef1fa6c112d487c8302b6186b21a760b7..3b5f10a770a22a3ffd00b2f15b491edc0c519b8a 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: socket.c,v 1.333.14.3 2011/02/28 01:20:04 tbox Exp $ */
+/* $Id: socket.c,v 1.333.14.4 2011/02/28 12:51:28 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