diff options
author | Matthew Gregan <kinetik@flim.org> | 2017-04-12 14:12:17 +1200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-04-12 23:12:06 +0200 |
commit | b905ba5bc18c89c7fccd8621795755644442ef19 (patch) | |
tree | c56d0d73c9d78969decccafa811c3537c30fdc16 /libavformat | |
parent | c1616b454dc0c1fd391140e5dec1da0c3228b1e1 (diff) | |
download | ffmpeg-b905ba5bc18c89c7fccd8621795755644442ef19.tar.gz |
avformat/movenc: Fix potential leak of sgpd_entries array.
Signed-off-by: Matthew Gregan <kinetik@flim.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/movenc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c index e6a70bffc0..e6e2313c53 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -2286,8 +2286,10 @@ static int mov_preroll_write_stbl_atoms(AVIOContext *pb, MOVTrack *track) } entries++; - if (!group) + if (!group) { + av_free(sgpd_entries); return 0; + } /* Write sgpd tag */ avio_wb32(pb, 24 + (group * 2)); /* size */ |