From: Mathieu Rene Date: Fri, 27 Feb 2009 19:29:52 +0000 (+0000) Subject: fix leak X-Git-Tag: v1.0.4~1774 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9b2b1f3691aef1263767f5112bdbc5c9dbbe411c;p=thirdparty%2Ffreeswitch.git fix leak git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12332 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- 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);