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
On 26.10.25 08:22, Fabian Wolter wrote:
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).
Hi Fabian,
you're absolutely right! Thanks for the patch!
Klaus