From 9b2b1f3691aef1263767f5112bdbc5c9dbbe411c Mon Sep 17 00:00:00 2001 From: Mathieu Rene Date: Fri, 27 Feb 2009 19:29:52 +0000 Subject: [PATCH] fix leak git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12332 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/switch_channel.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/switch_channel.c b/src/switch_channel.c index 1d278fe087..b671d0ecb6 100644 --- a/src/switch_channel.c +++ b/src/switch_channel.c @@ -279,7 +279,9 @@ SWITCH_DECLARE(switch_status_t) switch_channel_queue_dtmf(switch_channel_t *chan *dt = new_dtmf; while (switch_queue_trypush(channel->dtmf_queue, dt) != SWITCH_STATUS_SUCCESS) { - switch_queue_trypop(channel->dtmf_queue, &pop); + if (switch_queue_trypop(channel->dtmf_queue, &pop) == SWITCH_STATUS_SUCCESS) { + free(pop); + } if (++x > 100) { status = SWITCH_STATUS_FALSE; free(dt);