summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2001-03-03 13:23:39 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2001-03-03 13:23:39 +0100
commite2e3e0ae27ef7c25dc7c36dd4115bf74fa4fbec5 (patch)
tree234c98dad5576bba47d8b9233299e8b0b96ec08d
parentf2c4f2ba92d309d1d0c7a8427000c4cda420e0ff (diff)
downloadvdr-e2e3e0ae27ef7c25dc7c36dd4115bf74fa4fbec5.tar.gz
vdr-e2e3e0ae27ef7c25dc7c36dd4115bf74fa4fbec5.tar.bz2
Fixed a memory leak in the EIT processor that happened when the system time was set
-rw-r--r--HISTORY2
-rw-r--r--eit.c15
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 ------------------------------------------------------------