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>
pull/254/merge
Matthew Gregan 8 years ago committed by Michael Niedermayer
parent c1616b454d
commit b905ba5bc1
  1. 4
      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 */

Loading…
Cancel
Save