summaryrefslogtreecommitdiff
path: root/epg.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2005-05-05 12:41:21 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2005-05-05 12:41:21 +0200
commitfd2c54cec050587ed086e74a849ff1b8158cf5b8 (patch)
tree87a6a626800a750f059f711b6dd537f9096e267d /epg.c
parentc8b103c37f1048d5525b1267e0faaf8ca3e6b691 (diff)
downloadvdr-fd2c54cec050587ed086e74a849ff1b8158cf5b8.tar.gz
vdr-fd2c54cec050587ed086e74a849ff1b8158cf5b8.tar.bz2
Fixed a memory leak in tComponent
Diffstat (limited to 'epg.c')
-rw-r--r--epg.c6
1 files changed, 2 insertions, 4 deletions
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 <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;
}