[Freeswitch-svn] [commit] r12745 - in freeswitch/trunk/libs/sofia-sip: . libsofia-sip-ua/su

FreeSWITCH SVN mikej at freeswitch.org
Tue Mar 24 08:42:54 PDT 2009


Author: mikej
Date: Tue Mar 24 10:42:53 2009
New Revision: 12745

Log:
Mon Mar  9 12:44:03 CDT 2009  Pekka Pessi <first.last at nokia.com>
  * su_alloc: shorten race on _su_deinit()
  Ignore-this: 6d4e6edb434a96e66c9bb018a201a3c6
  
  Make home object unusable earlier during denitialization.


Modified:
   freeswitch/trunk/libs/sofia-sip/.update
   freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_alloc.c

Modified: freeswitch/trunk/libs/sofia-sip/.update
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/.update	(original)
+++ freeswitch/trunk/libs/sofia-sip/.update	Tue Mar 24 10:42:53 2009
@@ -1 +1 @@
-Tue Mar 24 10:41:20 CDT 2009
+Tue Mar 24 10:41:57 CDT 2009

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_alloc.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_alloc.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_alloc.c	Tue Mar 24 10:42:53 2009
@@ -993,6 +993,9 @@
   if (home->suh_blocks) {
     size_t i;
     su_block_t *b;
+    void *suh_lock = home->suh_lock;
+
+    home->suh_lock = NULL;
 
      if (home->suh_blocks->sub_destructor) {
       void (*destructor)(void *) = home->suh_blocks->sub_destructor;
@@ -1034,11 +1037,7 @@
 
     home->suh_blocks = NULL;
 
-    if (home->suh_lock) {
-      void *suh_lock = home->suh_lock;
-
-      home->suh_lock = NULL;
-
+    if (suh_lock) {
       /* Unlock, or risk assert() or leak handles on Windows */
       _su_home_unlocker(suh_lock);
       _su_home_destroy_mutexes(suh_lock);



More information about the Freeswitch-svn mailing list