res_hep: fix major leak that occurs when config is missing or enabled=no.
authorCorey Farrell <git@cfware.com>
Thu, 6 Nov 2014 09:24:26 +0000 (09:24 +0000)
committerCorey Farrell <git@cfware.com>
Thu, 6 Nov 2014 09:24:26 +0000 (09:24 +0000)
Add missing unreference in hepv3_send_packet.

ASTERISK-24491 #close
Reported by: Zane Conkle
Tested by: Zane Conkle
Review: https://reviewboard.asterisk.org/r/4150/
........

Merged revisions 427400 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 427405 from http://svn.asterisk.org/svn/asterisk/branches/13

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

res/res_hep.c

index 007d3b0..69a8ab3 100644 (file)
@@ -532,6 +532,7 @@ int hepv3_send_packet(struct hepv3_capture_info *capture_info)
        int res;
 
        if (!config || !config->general->enabled) {
+               ao2_ref(capture_info, -1);
                return 0;
        }