Browse Source

jvdec: Fix memory leak of jv->frames

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
tags/n2.2-rc1
Paul B Mahol Luca Barbato 13 years ago
parent
commit
e518cb863e
1 changed files with 10 additions and 0 deletions
  1. +10
    -0
      libavformat/jvdec.c

+ 10
- 0
libavformat/jvdec.c View File

@@ -59,6 +59,15 @@ static int read_probe(AVProbeData *pd)
return 0;
}

static int read_close(AVFormatContext *s)
{
JVDemuxContext *jv = s->priv_data;

av_freep(&jv->frames);

return 0;
}

static int read_header(AVFormatContext *s)
{
JVDemuxContext *jv = s->priv_data;
@@ -229,4 +238,5 @@ AVInputFormat ff_jv_demuxer = {
.read_header = read_header,
.read_packet = read_packet,
.read_seek = read_seek,
.read_close = read_close,
};

Loading…
Cancel
Save