]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
func_talkdetect: Fix stasis message leak in audiohook callback.
authorCorey Farrell <git@cfware.com>
Tue, 4 Nov 2014 19:37:10 +0000 (19:37 +0000)
committerCorey Farrell <git@cfware.com>
Tue, 4 Nov 2014 19:37:10 +0000 (19:37 +0000)
ASTERISK-24482 #close
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/4142/

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

funcs/func_talkdetect.c

index c4783f51f3a6d20ca1364c02474707c5d936a7c3..e82b6005132604b9d0ebef991f6dc46ddd5dc26c 100644 (file)
@@ -218,6 +218,7 @@ static int talk_detect_audiohook_cb(struct ast_audiohook *audiohook, struct ast_
                                blob);
                if (message) {
                        stasis_publish(ast_channel_topic(chan), message);
+                       ao2_ref(message, -1);
                }
 
                ast_json_unref(blob);