diff options
author | Mans Rullgard <mans@mansr.com> | 2011-05-04 17:57:37 +0100 |
---|---|---|
committer | Mans Rullgard <mans@mansr.com> | 2011-05-04 18:06:45 +0100 |
commit | eddd580b743692bc930692cb0c5a3e930ab45ad4 (patch) | |
tree | 79092a1859b0dde2552e00d037ea17edea13661b | |
parent | 7d2e03afc8573f959aa3641eea5c9f981466bcd8 (diff) | |
download | ffmpeg-eddd580b743692bc930692cb0c5a3e930ab45ad4.tar.gz |
matroskaenc: fix memory leak
This fixes a memory leak occurring when no cue points are defined
since commit 91819763.
Signed-off-by: Mans Rullgard <mans@mansr.com>
-rw-r--r-- | libavformat/matroskaenc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index c0427f9854..781121a68f 100644 --- a/libavformat/matroskaenc.c +++ b/libavformat/matroskaenc.c @@ -403,8 +403,6 @@ static int64_t mkv_write_cues(AVIOContext *pb, mkv_cues *cues, int num_tracks) } end_ebml_master(pb, cues_element); - av_free(cues->entries); - av_free(cues); return currentpos; } @@ -1160,6 +1158,8 @@ static int mkv_write_trailer(AVFormatContext *s) end_ebml_master(pb, mkv->segment); av_free(mkv->tracks); + av_freep(&mkv->cues->entries); + av_freep(&mkv->cues); av_destruct_packet(&mkv->cur_audio_pkt); avio_flush(pb); return 0; |