1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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>
This commit is contained in:
Mans Rullgard 2011-05-04 17:57:37 +01:00
parent 7d2e03afc8
commit eddd580b74

View File

@ -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;