Mercurial > mplayer.hg
comparison libmpdemux/demux_asf.c @ 23295:ab885f928444
Fix double free() in demux_asf.c
If demux_open_asf() fails it frees the demuxer->priv field before
returning. Then demuxer.c calls demux_close_asf() which frees the field
again. Fix by removing the free() in demux_open_asf().
author | uau |
---|---|
date | Mon, 14 May 2007 01:23:54 +0000 |
parents | cc01eab9f3a9 |
children | ab5ff1c5ccaa |
comparison
equal
deleted
inserted
replaced
23294:30c61fe726bf | 23295:ab885f928444 |
---|---|
699 sh_video_t *sh_video=NULL; | 699 sh_video_t *sh_video=NULL; |
700 | 700 |
701 //---- ASF header: | 701 //---- ASF header: |
702 if(!asf) return NULL; | 702 if(!asf) return NULL; |
703 init_priv(asf); | 703 init_priv(asf); |
704 if (!read_asf_header(demuxer,asf)) { | 704 if (!read_asf_header(demuxer,asf)) |
705 free(asf); | |
706 return NULL; | 705 return NULL; |
707 } | |
708 stream_reset(demuxer->stream); | 706 stream_reset(demuxer->stream); |
709 stream_seek(demuxer->stream,demuxer->movi_start); | 707 stream_seek(demuxer->stream,demuxer->movi_start); |
710 // demuxer->idx_pos=0; | 708 // demuxer->idx_pos=0; |
711 // demuxer->endpos=avi_header.movi_end; | 709 // demuxer->endpos=avi_header.movi_end; |
712 if(demuxer->video->id != -2) { | 710 if(demuxer->video->id != -2) { |