From: Richard Mudgett Date: Fri, 2 Mar 2012 15:50:59 +0000 (+0000) Subject: Fix channel reference leak in ChanSpy. X-Git-Tag: 10.3.0~72 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=edaf107a1e4f50e36b142add88ccaa14997f2059;p=thirdparty%2Fasterisk.git Fix channel reference leak in ChanSpy. * Fix next_channel() channel reference leak in ChanSpy. (closes issue ASTERISK-19461) Reported by: Irontec Patches: app_chanspy_iteartor_next_unref.patch (license #6213) patch uploaded by Irontec (issue ASTERISK-17515) ........ Merged revisions 357809 from http://svn.asterisk.org/svn/asterisk/branches/1.8 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@357810 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/apps/app_chanspy.c b/apps/app_chanspy.c index 3a8cf989d0..4652900779 100644 --- a/apps/app_chanspy.c +++ b/apps/app_chanspy.c @@ -748,8 +748,10 @@ redo: } if (!strncmp(next->name, "DAHDI/pseudo", pseudo_len)) { + ast_channel_unref(next); goto redo; } else if (next == chan) { + ast_channel_unref(next); goto redo; }