summaryrefslogtreecommitdiff
path: root/tools.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2005-11-04 14:27:51 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2005-11-04 14:27:51 +0100
commit259ed3055e96263701a2a569f288cb9753c82fb2 (patch)
tree42947aaf108e0c703cf6b66956ec222c4a0db232 /tools.c
parentfdfcfc021b593aee659567ecc251a33ee609d9ab (diff)
downloadvdr-259ed3055e96263701a2a569f288cb9753c82fb2.tar.gz
vdr-259ed3055e96263701a2a569f288cb9753c82fb2.tar.bz2
Fixed a memory leak in cString::operator=()
Diffstat (limited to 'tools.c')
-rw-r--r--tools.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools.c b/tools.c
index 24d8f275..e0a9ecf5 100644
--- a/tools.c
+++ b/tools.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: tools.c 1.101 2005/11/04 14:20:04 kls Exp $
+ * $Id: tools.c 1.102 2005/11/04 14:26:39 kls Exp $
*/
#include "tools.h"
@@ -534,6 +534,7 @@ cString::~cString()
cString &cString::operator=(const cString &String)
{
+ free(s);
s = String.s ? strdup(String.s) : NULL;
return *this;
}