[asterisk-commits] rmudgett: branch 1.8 r333010 - /branches/1.8/apps/app_queue.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Aug 23 13:14:04 CDT 2011


Author: rmudgett
Date: Tue Aug 23 13:14:01 2011
New Revision: 333010

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=333010
Log:
Memory Leak in app_queue

The patch that was committed in the 1.6.x versions of Asterisk for
ASTERISK-15862 actually fixed two issues.  One was not applicable to 1.8
but the other is.  queue_leak.patch fixes the portion applicable to 1.8.

(closes issue ASTERISK-18265)
Reported by: Fred Schroeder
Patches:
      queue_leak.patch (license #5049) patch uploaded by mmichelson
Tested by: Thomas Arimont

Modified:
    branches/1.8/apps/app_queue.c

Modified: branches/1.8/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/apps/app_queue.c?view=diff&rev=333010&r1=333009&r2=333010
==============================================================================
--- branches/1.8/apps/app_queue.c (original)
+++ branches/1.8/apps/app_queue.c Tue Aug 23 13:14:01 2011
@@ -1719,8 +1719,13 @@
 	ast_string_field_set(q, sound_thanks, "queue-thankyou");
 	ast_string_field_set(q, sound_reporthold, "queue-reporthold");
 
-	if ((q->sound_periodicannounce[0] = ast_str_create(32)))
+	if (!q->sound_periodicannounce[0]) {
+		q->sound_periodicannounce[0] = ast_str_create(32);
+	}
+
+	if (q->sound_periodicannounce[0]) {
 		ast_str_set(&q->sound_periodicannounce[0], 0, "queue-periodic-announce");
+	}
 
 	for (i = 1; i < MAX_PERIODIC_ANNOUNCEMENTS; i++) {
 		if (q->sound_periodicannounce[i])




More information about the asterisk-commits mailing list