[vlc-devel] commit: Revert "Fix memleak in mpga demuxer" ( Rafaël Carré )
git version control
git at videolan.org
Sat May 10 00:26:41 CEST 2008
vlc | branch: master | Rafaël Carré <funman at videolan.org> | Sat May 10 00:16:28 2008 +0200| [587910d68cda330158f4c00cad82eac7c613666a]
Revert "Fix memleak in mpga demuxer"
This reverts commit 9a90c961a6d1c670a9e282c99ea8da0ba7688eab.
This introduces double free
I tend to prefer a memleak as a race condition rather than a crash
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=587910d68cda330158f4c00cad82eac7c613666a
---
modules/demux/mpeg/mpga.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/modules/demux/mpeg/mpga.c b/modules/demux/mpeg/mpga.c
index 1c4d9ec..f0cc0c2 100644
--- a/modules/demux/mpeg/mpga.c
+++ b/modules/demux/mpeg/mpga.c
@@ -273,7 +273,9 @@ static int Demux( demux_t *p_demux )
{
p_sys->b_start = false;
p_block_in = p_sys->p_block_in;
+ p_sys->p_block_in = NULL;
p_block_out = p_sys->p_block_out;
+ p_sys->p_block_out = NULL;
}
else
{
@@ -325,7 +327,6 @@ static void Close( vlc_object_t * p_this )
DESTROY_PACKETIZER( p_sys->p_packetizer );
if( p_sys->p_block_out ) block_Release( p_sys->p_block_out );
- if( p_sys->p_block_in ) block_Release( p_sys->p_block_in );
free( p_sys );
}
More information about the vlc-devel
mailing list