avformat/mov: Fix memory leak in encryption info.

Signed-off-by: Jacob Trimble <modmaker@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Jacob Trimble 2018-04-19 09:35:22 -07:00 committed by Michael Niedermayer
parent fbfee6adea
commit 606c5c7f3a

View File

@ -5833,6 +5833,7 @@ static int mov_read_sample_encryption_info(MOVContext *c, AVIOContext *pb, MOVSt
if (use_subsamples) {
subsample_count = avio_rb16(pb);
av_free((*sample)->subsamples);
(*sample)->subsamples = av_mallocz_array(subsample_count, sizeof(*subsamples));
if (!(*sample)->subsamples) {
av_encryption_info_free(*sample);