Commit eddd580b authored by Mans Rullgard's avatar Mans Rullgard
Browse files

matroskaenc: fix memory leak

This fixes a memory leak occurring when no cue points are defined
since commit 91819763

.
Signed-off-by: default avatarMans Rullgard <mans@mansr.com>
parent 7d2e03af
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment