]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix leak
authorMathieu Rene <mrene@avgs.ca>
Fri, 27 Feb 2009 19:29:52 +0000 (19:29 +0000)
committerMathieu Rene <mrene@avgs.ca>
Fri, 27 Feb 2009 19:29:52 +0000 (19:29 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12332 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_channel.c

index 1d278fe087ff1dfc244d1e2444e09c783fd47c19..b671d0ecb6337d9157418ce1124c82630df1ebb7 100644 (file)
@@ -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);