[vlc-devel] Re: win32_specific.c memory leak

Brian Robb vascy at hotmail.com
Tue Sep 6 22:43:25 CEST 2005

I've attached a patch for this too.

----Original Message Follows----
There's a memory leak in win32_specific.c...

You have:

void system_End( vlc_t *p_this )

But it should be:

void system_End( vlc_t *p_this )
    if ( p_this && p_this->p_libvlc && p_this->p_libvlc->psz_vlcpath) {
	free( p_this->p_libvlc->psz_vlcpath );
        p_this->p_libvlc->psz_vlcpath = NULL;


Without this, the strdup that is stored in p_this->p_libvlc->psz_vlcpath is 

(The void system_End( vlc_t *p_this ) in beos_specific.c has
a free( p_this->p_libvlc->psz_vlcpath ); here too,
so it should be in the right place.)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: flik.win32_specific_memory_leak.patch
Type: application/octet-stream
Size: 529 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20050906/69779ea4/attachment.obj>

More information about the vlc-devel mailing list