diff options
author | Richard Mudgett <rmudgett@digium.com> | 2011-08-23 18:17:52 +0000 |
---|---|---|
committer | Richard Mudgett <rmudgett@digium.com> | 2011-08-23 18:17:52 +0000 |
commit | 436ceb827c218ffa3296163cceb65c0f6e0417fa (patch) | |
tree | 4fc8db4c31a847b4e37d07293e3307a848ad324a | |
parent | 76a808ed22347aedbafa8dfb42a90d23100f0600 (diff) |
Merged revisions 333011 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10
................
r333011 | rmudgett | 2011-08-23 13:15:49 -0500 (Tue, 23 Aug 2011) | 19 lines
Merged revisions 333010 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
........
r333010 | rmudgett | 2011-08-23 13:14:01 -0500 (Tue, 23 Aug 2011) | 12 lines
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
........
................
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@333014 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r-- | apps/app_queue.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c index 0e57ec4e1..7cd3b9ed8 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -1747,8 +1747,13 @@ static void init_queue(struct call_queue *q) 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]) |