Module: libav Branch: release/11 Commit: 0ee4347b8233d69901a7bb0872ce6524f535e45e
Author: Andreas Cadhalpun <[email protected]> Committer: Luca Barbato <[email protected]> Date: Tue May 26 14:24:36 2015 +0100 mov: Fix two memleaks Signed-off-by: Andreas Cadhalpun <[email protected]> Signed-off-by: Luca Barbato <[email protected]> CC: [email protected] --- libavformat/mov.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index d7acd2c..f116a27 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -1790,10 +1790,11 @@ static int mov_read_stsz(MOVContext *c, AVIOContext *pb, MOVAtom atom) sc->sample_count = i; + av_free(buf); + if (pb->eof_reached) return AVERROR_EOF; - av_free(buf); return 0; } @@ -1876,6 +1877,8 @@ static int mov_read_ctts(MOVContext *c, AVIOContext *pb, MOVAtom atom) av_dlog(c->fc, "track[%i].ctts.entries = %i\n", c->fc->nb_streams-1, entries); + av_freep(&sc->ctts_data); + if (!entries) return 0; if (entries >= UINT_MAX / sizeof(*sc->ctts_data)) _______________________________________________ libav-commits mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-commits
