diff options
author | Paul B Mahol <onemda@gmail.com> | 2012-07-03 09:51:44 +0000 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2012-07-03 09:53:42 +0000 |
commit | 596814f9781772050c65bdd8add27445bc8374a4 (patch) | |
tree | fd154298749e1c14c37f691a677b7a2ef755a67b /libavformat/jvdec.c | |
parent | 9d0c71e5e34dec2c6246bf47da8d9674c92f85c1 (diff) | |
download | ffmpeg-596814f9781772050c65bdd8add27445bc8374a4.tar.gz |
jvdec: fix memleak of jv->frames
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavformat/jvdec.c')
-rw-r--r-- | libavformat/jvdec.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libavformat/jvdec.c b/libavformat/jvdec.c index 504be089c7..e7594b9260 100644 --- a/libavformat/jvdec.c +++ b/libavformat/jvdec.c @@ -216,6 +216,15 @@ static int read_seek(AVFormatContext *s, int stream_index, return 0; } +static int read_close(AVFormatContext *s) +{ + JVDemuxContext *jv = s->priv_data; + + av_freep(&jv->frames); + + return 0; +} + AVInputFormat ff_jv_demuxer = { .name = "jv", .long_name = NULL_IF_CONFIG_SMALL("Bitmap Brothers JV"), @@ -224,4 +233,5 @@ AVInputFormat ff_jv_demuxer = { .read_header = read_header, .read_packet = read_packet, .read_seek = read_seek, + .read_close = read_close, }; |