From 26412e88881697f2ca54164e20dfe75173d1ffd6 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Mon, 27 Dec 2021 11:11:16 +0100 Subject: [PATCH] Fixed a memory leak in handling the NIT --- CONTRIBUTORS | 1 + HISTORY | 1 + nit.c | 4 +++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 5d23c9b0..efb6eb1b 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -3649,6 +3649,7 @@ Helmut Binder PMT pid were checked any more for reporting a problem with PMT handling in case locking the Channels list times out for avoiding a lengthy lock on the Channels list when starting a recording + for fixing a memory leak in handling the NIT Ulrich Eckhardt for reporting a problem with shutdown after user inactivity in case a plugin is diff --git a/HISTORY b/HISTORY index 9c58aef9..ba1b4f64 100644 --- a/HISTORY +++ b/HISTORY @@ -9581,3 +9581,4 @@ Video Disk Recorder Revision History - Fixed cTsPayload::AtPayloadStart() to ignore TS packets from other PIDs. - Fixed unlocking vs. call to EpgHandlers.EndSegmentTransfer() (reported by Christoph Haubrich). +- Fixed a memory leak in handling the NIT (thanks to Helmut Binder). diff --git a/nit.c b/nit.c index 785aba52..54564077 100644 --- a/nit.c +++ b/nit.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: nit.c 4.9 2019/05/31 13:25:00 kls Exp $ + * $Id: nit.c 4.9.1.1 2021/12/27 11:09:16 kls Exp $ */ #include "nit.h" @@ -102,8 +102,10 @@ void cNitFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length for (SI::Loop::Iterator it2; (d = ts.transportStreamDescriptors.getNext(it2)); ) { if (d->getDescriptorTag() == SI::S2SatelliteDeliverySystemDescriptorTag) { ForceDVBS2 = true; + delete d; break; } + delete d; } for (SI::Loop::Iterator it2; (d = ts.transportStreamDescriptors.getNext(it2)); ) {