mov: Fix two memleaks

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>

CC: libav-stable@libav.org
pull/136/head
Andreas Cadhalpun 10 years ago committed by Luca Barbato
parent 3f38d4b816
commit f261a55d72
  1. 5
      libavformat/mov.c

@ -1942,10 +1942,11 @@ static int mov_read_stsz(MOVContext *c, AVIOContext *pb, MOVAtom atom)
sc->sample_count = i; sc->sample_count = i;
av_free(buf);
if (pb->eof_reached) if (pb->eof_reached)
return AVERROR_EOF; return AVERROR_EOF;
av_free(buf);
return 0; return 0;
} }
@ -2028,6 +2029,8 @@ static int mov_read_ctts(MOVContext *c, AVIOContext *pb, MOVAtom atom)
av_log(c->fc, AV_LOG_TRACE, "track[%i].ctts.entries = %i\n", c->fc->nb_streams-1, entries); av_log(c->fc, AV_LOG_TRACE, "track[%i].ctts.entries = %i\n", c->fc->nb_streams-1, entries);
av_freep(&sc->ctts_data);
if (!entries) if (!entries)
return 0; return 0;
if (entries >= UINT_MAX / sizeof(*sc->ctts_data)) if (entries >= UINT_MAX / sizeof(*sc->ctts_data))

Loading…
Cancel
Save