Hi,

I'm a bit hesitant to post this, because a mem leak in such old code seems quite unlikely. But Valgrind reports an error, and if I see correctly the strdup() is already done in cString::operator=(const char *String).

VDR 2.7.7

==92645== 168 bytes in 6 blocks are definitely lost in loss record 2,815 of 3,354
==92645==    at 0x48850C8: malloc (vg_replace_malloc.c:381)
==92645==    by 0x4E68B2F: strdup (strdup.c:42)
==92645==    by 0x28F8EF: cMark::Parse(char const*) (recording.c:2288)
==92645== by 0x29534B: cConfig<cMark>::Load(char const*, bool, bool) (config.h:158)
==92645==    by 0x28FD2B: cMarks::Update() (recording.c:2349)
==92645== by 0x28FB4B: cMarks::Load(char const*, double, bool) (recording.c:2325)
==92645==    by 0x25B18B: cReplayControl::cReplayControl(bool) (menu.c:5748)
==92645==    by 0x2F9C03: main (vdr.c:1452)

Best regards,
Fabian
diff --git a/recording.c b/recording.c
index 9df00429..247baa25 100644
--- a/recording.c
+++ b/recording.c
@@ -2285,7 +2285,7 @@ bool cMark::Parse(const char *s)
   if (p) {
      p = skipspace(p);
      if (*p)
-        comment = strdup(p);
+        comment = p;
      }
   return true;
 }
_______________________________________________
vdr mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to