]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fix channel reference leak in ChanSpy.
authorRichard Mudgett <rmudgett@digium.com>
Fri, 2 Mar 2012 15:45:45 +0000 (15:45 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Fri, 2 Mar 2012 15:45:45 +0000 (15:45 +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)

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

apps/app_chanspy.c

index 2761a143f5ad7da5aa45ac372931f418567c02ee..e0279f9ae0042c125696c47f7c70a5da5a62411c 100644 (file)
@@ -745,8 +745,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;
        }