summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorMatthew Gregan <kinetik@flim.org>2017-04-12 14:12:17 +1200
committerMichael Niedermayer <michael@niedermayer.cc>2017-04-12 23:12:06 +0200
commitb905ba5bc18c89c7fccd8621795755644442ef19 (patch)
treec56d0d73c9d78969decccafa811c3537c30fdc16 /libavformat
parentc1616b454dc0c1fd391140e5dec1da0c3228b1e1 (diff)
downloadffmpeg-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.c4
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 */