From 4f889749b3d4a6f3e0c24cc03bd4e432c6638cdf Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sun, 13 May 2012 13:46:56 +0200 Subject: [PATCH] Fixed a mismatched 'delete' in cSchedules::SetEpgDataFileName() --- CONTRIBUTORS | 1 + HISTORY | 4 +++- epg.c | 6 +++--- epg.h | 4 ++-- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index d3ceff3c..b1f19e45 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -2881,6 +2881,7 @@ Marcus Roscher Reinhard Mantey for reporting a problem with character comparisons in cSubtitleObject::DecodeCharacterString() + for fixing a mismatched 'delete' in cSchedules::SetEpgDataFileName() Michael Schneider for reporting a problem with the EPG scan in case a transponder is not receivable in diff --git a/HISTORY b/HISTORY index a90e9ddd..dba012e7 100644 --- a/HISTORY +++ b/HISTORY @@ -7052,7 +7052,7 @@ Video Disk Recorder Revision History - Fixed handling IDLEPRIORITY in cDvbDevice::ProvidesChannel() (thanks to Frank Schmirler). -2012-05-12: Version 1.7.28 +2012-05-13: Version 1.7.28 - Fixed cPixmapMemory::DrawEllipse() for quadrants -1 and -4. - Fixed getting the maximum short channel name length in case there are no short names @@ -7106,3 +7106,5 @@ Video Disk Recorder Revision History Wilke). - The new member function cSkinDisplayReplay::SetRecording() allows a skin to display more information about the currently played recording. +- Fixed a mismatched 'delete' in cSchedules::SetEpgDataFileName() (thanks to Reinhard + Mantey). diff --git a/epg.c b/epg.c index f5c9b3a3..51582e8f 100644 --- a/epg.c +++ b/epg.c @@ -7,7 +7,7 @@ * Original version (as used in VDR before 1.3.0) written by * Robert Schneider and Rolf Hakenes . * - * $Id: epg.c 2.12 2012/03/10 13:14:27 kls Exp $ + * $Id: epg.c 2.13 2012/05/13 13:46:56 kls Exp $ */ #include "epg.h" @@ -1125,7 +1125,7 @@ cSchedulesLock::~cSchedulesLock() // --- cSchedules ------------------------------------------------------------ cSchedules cSchedules::schedules; -const char *cSchedules::epgDataFileName = NULL; +char *cSchedules::epgDataFileName = NULL; time_t cSchedules::lastCleanup = time(NULL); time_t cSchedules::lastDump = time(NULL); time_t cSchedules::modified = 0; @@ -1137,7 +1137,7 @@ const cSchedules *cSchedules::Schedules(cSchedulesLock &SchedulesLock) void cSchedules::SetEpgDataFileName(const char *FileName) { - delete epgDataFileName; + free(epgDataFileName); epgDataFileName = FileName ? strdup(FileName) : NULL; } diff --git a/epg.h b/epg.h index e4cec9b9..fc1e410f 100644 --- a/epg.h +++ b/epg.h @@ -7,7 +7,7 @@ * Original version (as used in VDR before 1.3.0) written by * Robert Schneider and Rolf Hakenes . * - * $Id: epg.h 2.8 2012/03/10 13:50:10 kls Exp $ + * $Id: epg.h 2.9 2012/05/13 13:45:50 kls Exp $ */ #ifndef __EPG_H @@ -192,7 +192,7 @@ class cSchedules : public cList { private: cRwLock rwlock; static cSchedules schedules; - static const char *epgDataFileName; + static char *epgDataFileName; static time_t lastCleanup; static time_t lastDump; static time_t modified;