[asterisk-commits] mnicholson: branch 1.4 r311201 - /branches/1.4/main/manager.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Mar 17 14:09:42 CDT 2011


Author: mnicholson
Date: Thu Mar 17 14:09:37 2011
New Revision: 311201

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=311201
Log:
Don't dec the usecount of an eventqent then use it.

ABE-2756

Modified:
    branches/1.4/main/manager.c

Modified: branches/1.4/main/manager.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.4/main/manager.c?view=diff&rev=311201&r1=311200&r2=311201
==============================================================================
--- branches/1.4/main/manager.c (original)
+++ branches/1.4/main/manager.c Thu Mar 17 14:09:37 2011
@@ -784,7 +784,8 @@
 
 static void unuse_eventqent(struct eventqent *e)
 {
-	if (ast_atomic_dec_and_test(&e->usecount) && e->next)
+	struct eventqent *next = e->next;
+	if (ast_atomic_dec_and_test(&e->usecount) && next)
 		pthread_kill(t, SIGURG);
 }
 




More information about the asterisk-commits mailing list