From bd245e45f6fd0ca97fad2920a0dd585ffeec9dab Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sun, 14 Apr 2013 12:56:42 +0200 Subject: [PATCH] sectionsd: fix memleak with unused events Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/3ea3f174608d90daa39dab74554329f0aa8f4004 Author: Stefan Seyfried Date: 2013-04-14 (Sun, 14 Apr 2013) --- src/eitd/sectionsd.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/eitd/sectionsd.cpp b/src/eitd/sectionsd.cpp index fe1c09dbd..13f8598dc 100644 --- a/src/eitd/sectionsd.cpp +++ b/src/eitd/sectionsd.cpp @@ -433,6 +433,7 @@ xprintf("addEvent: ch %012" PRIx64 " running %d (%s) got_CN %d\n", evt.get_chann continue; /* else: keep the old event with the lower table_id */ unlockEvents(); + delete eptr; return; } if ((*x)->times.begin()->startzeit >= end_time) @@ -448,6 +449,7 @@ xprintf("addEvent: ch %012" PRIx64 " running %d (%s) got_CN %d\n", evt.get_chann dprintf("%s: don't replace 0x%012" PRIx64 ".%02x with 0x%012" PRIx64 ".%02x\n", __func__, x_key, (*x)->table_id, e_key, e->table_id); unlockEvents(); + delete eptr; return; } /* SRF special case: advertising is inserted with start time of