summaryrefslogtreecommitdiff
path: root/themes.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2004-06-18 15:06:21 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2004-06-18 15:06:21 +0200
commit480afc6bc8636b10849a9e61b73151e81b794f93 (patch)
treeccd310fa5aed7bcfe5ec4630599c2f4b6a61542b /themes.c
parentf3ea26c74f534d4981e00adb58d0f4363131275f (diff)
downloadvdr-480afc6bc8636b10849a9e61b73151e81b794f93.tar.gz
vdr-480afc6bc8636b10849a9e61b73151e81b794f93.tar.bz2
Fixed a memory leak in theme description handling
Diffstat (limited to 'themes.c')
-rw-r--r--themes.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/themes.c b/themes.c
index 1b6adf9d..0a9b951d 100644
--- a/themes.c
+++ b/themes.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: themes.c 1.2 2004/05/22 10:30:06 kls Exp $
+ * $Id: themes.c 1.3 2004/06/18 15:05:07 kls Exp $
*/
#include "themes.h"
@@ -114,8 +114,10 @@ bool cTheme::Load(const char *FileName, bool OnlyDescriptions)
char *l = strchr(n, '.');
if (l)
lang = I18nLanguageIndex(++l);
- if (lang >= 0)
+ if (lang >= 0) {
+ free(descriptions[lang]);
descriptions[lang] = strdup(v);
+ }
else
error = "invalid language code";
}