Fix channel reference leak in ChanSpy.
authorRichard Mudgett <rmudgett@digium.com>
Fri, 2 Mar 2012 16:03:38 +0000 (16:03 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Fri, 2 Mar 2012 16:03:38 +0000 (16:03 +0000)
* 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
........

Merged revisions 357810 from http://svn.asterisk.org/svn/asterisk/branches/10

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@357815 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_chanspy.c

index a7afe97..9337299 100644 (file)
@@ -748,8 +748,10 @@ redo:
        }
 
        if (!strncmp(ast_channel_name(next), "DAHDI/pseudo", pseudo_len)) {
+               ast_channel_unref(next);
                goto redo;
        } else if (next == chan) {
+               ast_channel_unref(next);
                goto redo;
        }