From 1de063ca386acd06b9aa646f0c6cdb07be8b957a Mon Sep 17 00:00:00 2001 From: Alexander Pipelka Date: Sat, 23 Sep 2017 19:53:56 +0200 Subject: [PATCH] Fixed memory leak in cSatipSectionFilter. --- sectionfilter.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sectionfilter.c b/sectionfilter.c index 10f655b..1d17369 100644 --- a/sectionfilter.c +++ b/sectionfilter.c @@ -102,8 +102,11 @@ int cSatipSectionFilter::Filter(void) if (doneqM && !neq) return 0; - if (ringBufferM && (secLenM > 0)) - ringBufferM->Put(new cFrame(secBufM, secLenM)); + if (ringBufferM && (secLenM > 0)) { + cFrame* section = new cFrame(secBufM, secLenM); + if (!ringBufferM->Put(section)) + DELETE_POINTER(section); + } } return 0; }