]> 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:48:30 +0000 (12:48 +0000)
committerMark Andrews <marka@isc.org>
Mon, 28 Feb 2011 12:48:30 +0000 (12:48 +0000)
                        [RT #23333]

CHANGES
lib/isc/unix/socket.c

diff --git a/CHANGES b/CHANGES
index 23bb758751f620350649bbcecc166df70109d7fd..dbc18a037a87b56d3bffbb51795614c4c181c6d3 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 fd9d141a33cac6895400f52294e4d052f0b37f0a..0f1ac4f6ac6b5b5d5a4d4bde7f654586b0009258 100644 (file)
@@ -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