From fd2c54cec050587ed086e74a849ff1b8158cf5b8 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Thu, 5 May 2005 12:41:21 +0200 Subject: Fixed a memory leak in tComponent --- CONTRIBUTORS | 4 ++++ HISTORY | 1 + epg.c | 6 ++---- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 9693009e..e364353a 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -193,6 +193,7 @@ Stefan Huelswitt for reporting several memory leaks that were introduced through the use of cString for adding MPEG1 replay capability to cPesAssembler for fixing handling symbolic links in cRecordings::ScanVideoDir() + for reporting a memory leak in tComponent Ulrich Röder for pointing out that there are channels that have a symbol rate higher than 27500 @@ -1308,3 +1309,6 @@ Ville Skytt Steffen Beyer for fixing setting the colored button help after deleting a recording in case the next menu entry is a directory + +Daniel Thompson + for fixing a memory leak in tComponent diff --git a/HISTORY b/HISTORY index 0b9bf111..658b9a0f 100644 --- a/HISTORY +++ b/HISTORY @@ -3479,3 +3479,4 @@ Video Disk Recorder Revision History - Now including the optional user defined Make.config from the 'libsi' Makefile (thanks to Ville Skyttä). - Updated the Danish OSD texts (thanks to Mogens Elneff). +- Fixed a memory leak in tComponent (thanks to Stefan Huelswitt and Daniel Thompson). diff --git a/epg.c b/epg.c index 7b0fcd90..9446073c 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 1.27 2005/03/20 12:34:19 kls Exp $ + * $Id: epg.c 1.28 2005/05/05 12:37:15 kls Exp $ */ #include "epg.h" @@ -29,9 +29,7 @@ bool tComponent::FromString(const char *s) { unsigned int Stream, Type; int n = sscanf(s, "%X %02X %3c %a[^\n]", &Stream, &Type, language, &description); - if (n != 4) - description = NULL; - else if (isempty(description)) { + if (n != 4 || isempty(description)) { free(description); description = NULL; } -- cgit v1.2.3