diff options
author | uau <uau@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-05-14 01:23:54 +0000 |
---|---|---|
committer | uau <uau@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-05-14 01:23:54 +0000 |
commit | de444acf515984c9ebf18d84af4f52a19190fe5f (patch) | |
tree | abec8cf6cb202cf058b3f2d5e86f229e1cf6ff92 | |
parent | 4014582d7b2dc10b0f843d34bbbd101883db2a68 (diff) |
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().
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23313 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | libmpdemux/demux_asf.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/libmpdemux/demux_asf.c b/libmpdemux/demux_asf.c index 88b6ccac46..2b7fd86488 100644 --- a/libmpdemux/demux_asf.c +++ b/libmpdemux/demux_asf.c @@ -701,10 +701,8 @@ static demuxer_t* demux_open_asf(demuxer_t* demuxer) //---- ASF header: if(!asf) return NULL; init_priv(asf); - if (!read_asf_header(demuxer,asf)) { - free(asf); + if (!read_asf_header(demuxer,asf)) return NULL; - } stream_reset(demuxer->stream); stream_seek(demuxer->stream,demuxer->movi_start); // demuxer->idx_pos=0; |