[vlc-devel] commit: Do not malloc(0) - to make valgrind not report 0 byte leaks ( Rafaël Carré )
funman at videolan.org
Mon May 26 10:59:25 CEST 2008
2008/5/26 Remi Denis-Courmont <rdenis at simphalempin.com>:
> On Mon, 26 May 2008 10:24:33 +0200 (CEST), git at videolan.org (git version
> control) wrote:
>> vlc | branch: master | Rafaël Carré <funman at videolan.org> | Mon May 26
>> 10:25:47 2008 +0200| [69b32f594f9440af60885ff4006af756b05a208b]
>> Do not malloc(0) - to make valgrind not report 0 byte leaks
> Were they actually leaks, by the way? If so, I think your commit is right
> :) but the log message a bit misleading: it sounded like you're hiding a
> memleak instead of fixing it :o
I copy the msg by hand, because valgrind runs on another computer:
"0 bytes in 1 blocks are definitely lost in loss record 1 of 29"
at 0xblablabla vg_replace_malloc()
by 0xblablabla PMT_CallBack (ts.c:3247)
It's a leak in the sense that the valid pointer is not freed, but I
wonder if it has any side effects, I suppose libc keeps a reference to
this pointer, so after X allocations, there will be a leak of X *
sizeof(void*) bytes, not in VLC but in libc.
Don't worry I'm not hiding leaks, my boss asks me to fix them all !
More information about the vlc-devel