[FFmpeg-cvslog] avformat/movenc: Fix potential leak of sgpd_entries array.

Matthew Gregan git at videolan.org
Thu Apr 13 00:13:05 EEST 2017


ffmpeg | branch: master | Matthew Gregan <kinetik at flim.org> | Wed Apr 12 14:12:17 2017 +1200| [b905ba5bc18c89c7fccd8621795755644442ef19] | committer: Michael Niedermayer

avformat/movenc: Fix potential leak of sgpd_entries array.

Signed-off-by: Matthew Gregan <kinetik at flim.org>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b905ba5bc18c89c7fccd8621795755644442ef19
---

 libavformat/movenc.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

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 */



More information about the ffmpeg-cvslog mailing list