From e2e3e0ae27ef7c25dc7c36dd4115bf74fa4fbec5 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sat, 3 Mar 2001 13:23:39 +0100 Subject: [PATCH] Fixed a memory leak in the EIT processor that happened when the system time was set --- HISTORY | 2 ++ eit.c | 15 +++++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/HISTORY b/HISTORY index 01d8d1f7..7d589864 100644 --- a/HISTORY +++ b/HISTORY @@ -421,3 +421,5 @@ Video Disk Recorder Revision History - Enhanced 'channels.conf.cable' (thanks to Hans-Peter Raschke). - Fixed switching to another channel via the EPG while a recording is being replayed. +- Fixed a memory leak in the EIT processor that happened when the system time + was set. diff --git a/eit.c b/eit.c index 08588b06..f29a2fad 100644 --- a/eit.c +++ b/eit.c @@ -13,7 +13,7 @@ * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * - * $Id: eit.c 1.12 2001/02/24 12:12:58 kls Exp $ + * $Id: eit.c 1.13 2001/03/03 13:23:00 kls Exp $ ***************************************************************************/ #include "eit.h" @@ -181,16 +181,15 @@ protected: // Protected attributes /** */ tdt_t tdt; /** */ - cMJD * mjd; + cMJD mjd; // kls 2001-03-02: made this a member instead of a pointer (it wasn't deleted in the destructor!) }; cTDT::cTDT(tdt_t *ptdt) +:tdt(*ptdt) +,mjd(tdt.utc_date_hi, tdt.utc_date_lo, tdt.utc_hour_ten * 10 + tdt.utc_hour, + tdt.utc_min_ten * 10 + tdt.utc_min, + tdt.utc_sec_ten * 10 + tdt.utc_sec) { - tdt = *ptdt; - mjd = new cMJD(tdt.utc_date_hi, tdt.utc_date_lo, - tdt.utc_hour_ten * 10 + tdt.utc_hour, - tdt.utc_min_ten * 10 + tdt.utc_min, - tdt.utc_sec_ten * 10 + tdt.utc_sec); } cTDT::~cTDT() @@ -199,7 +198,7 @@ cTDT::~cTDT() /** */ bool cTDT::SetSystemTime() { - return mjd->SetSystemTime(); + return mjd.SetSystemTime(); } // --- cEventInfo ------------------------------------------------------------