diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2005-05-05 12:41:21 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2005-05-05 12:41:21 +0200 |
commit | fd2c54cec050587ed086e74a849ff1b8158cf5b8 (patch) | |
tree | 87a6a626800a750f059f711b6dd537f9096e267d /epg.c | |
parent | c8b103c37f1048d5525b1267e0faaf8ca3e6b691 (diff) | |
download | vdr-fd2c54cec050587ed086e74a849ff1b8158cf5b8.tar.gz vdr-fd2c54cec050587ed086e74a849ff1b8158cf5b8.tar.bz2 |
Fixed a memory leak in tComponent
Diffstat (limited to 'epg.c')
-rw-r--r-- | epg.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -7,7 +7,7 @@ * Original version (as used in VDR before 1.3.0) written by * Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>. * - * $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; } |