Commit c49a3ec3 authored by Ronald S. Bultje's avatar Ronald S. Bultje

Fix double free which happens for playback of .rm files after r16365. See

"rmdec.c: double free" discussion on mailinglist, patch with suggestions
from Reimar Doffinger.

Originally committed as revision 16378 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 133e5c40
...@@ -438,6 +438,7 @@ static void ...@@ -438,6 +438,7 @@ static void
rdt_free_extradata (PayloadContext *rdt) rdt_free_extradata (PayloadContext *rdt)
{ {
ff_rm_free_rmstream(rdt->rmst[0]); ff_rm_free_rmstream(rdt->rmst[0]);
av_free(rdt->rmst[0]);
if (rdt->rmctx) if (rdt->rmctx)
av_close_input_stream(rdt->rmctx); av_close_input_stream(rdt->rmctx);
av_freep(&rdt->mlti_data); av_freep(&rdt->mlti_data);
......
...@@ -83,7 +83,6 @@ void ff_rm_free_rmstream (RMStream *rms) ...@@ -83,7 +83,6 @@ void ff_rm_free_rmstream (RMStream *rms)
{ {
av_free(rms->videobuf); av_free(rms->videobuf);
av_free(rms->audiobuf); av_free(rms->audiobuf);
av_free(rms);
} }
static int rm_read_audio_stream_info(AVFormatContext *s, ByteIOContext *pb, static int rm_read_audio_stream_info(AVFormatContext *s, ByteIOContext *pb,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment