[asterisk-commits] mmichelson: branch 1.4 r85852 - /branches/1.4/apps/app_queue.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Oct 16 10:21:59 CDT 2007


Author: mmichelson
Date: Tue Oct 16 10:21:58 2007
New Revision: 85852

URL: http://svn.digium.com/view/asterisk?view=rev&rev=85852
Log:
Fixing a double free which happens in the statechange thread.

(closes issue #10987, reported by andrew)


Modified:
    branches/1.4/apps/app_queue.c

Modified: branches/1.4/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/apps/app_queue.c?view=diff&rev=85852&r1=85851&r2=85852
==============================================================================
--- branches/1.4/apps/app_queue.c (original)
+++ branches/1.4/apps/app_queue.c Tue Oct 16 10:21:58 2007
@@ -543,7 +543,6 @@
 	if (loc) {
 		*loc++ = '\0';
 	} else {
-		free(sc);
 		return NULL;
 	}
 
@@ -564,7 +563,6 @@
 	if (!curint) {
 		if (option_debug > 2)
 			ast_log(LOG_DEBUG, "Device '%s/%s' changed to state '%d' (%s) but we don't care because they're not a member of any queue.\n", technology, loc, sc->state, devstate2str(sc->state));
-		free(sc);
 		return NULL;
 	}
 
@@ -612,8 +610,6 @@
 		ast_mutex_unlock(&q->lock);
 	}
 	AST_LIST_UNLOCK(&queues);
-
-	free(sc);
 
 	return NULL;
 }




More information about the asterisk-commits mailing list