From 1aae5981a7165f5236a9f3a1518ab2b6f7c7eae9 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 8 Sep 2013 05:17:05 +0200 Subject: core: remove a minor memory leak --- mpvcore/timeline/tl_edl.c | 1 + mpvcore/timeline/tl_matroska.c | 1 + 2 files changed, 2 insertions(+) (limited to 'mpvcore') diff --git a/mpvcore/timeline/tl_edl.c b/mpvcore/timeline/tl_edl.c index 4b8cf7ed17..6fdcd6685c 100644 --- a/mpvcore/timeline/tl_edl.c +++ b/mpvcore/timeline/tl_edl.c @@ -349,6 +349,7 @@ void build_edl_timeline(struct MPContext *mpctx) struct demuxer **sources = talloc_array_ptrtype(NULL, sources, num_sources + 1); + talloc_free(mpctx->sources); mpctx->sources = sources; sources[0] = mpctx->demuxer; mpctx->num_sources = 1; diff --git a/mpvcore/timeline/tl_matroska.c b/mpvcore/timeline/tl_matroska.c index 17ad192d37..cad1c3444e 100644 --- a/mpvcore/timeline/tl_matroska.c +++ b/mpvcore/timeline/tl_matroska.c @@ -365,6 +365,7 @@ void build_ordered_chapter_timeline(struct MPContext *mpctx) if (missing_time) mp_msg(MSGT_CPLAYER, MSGL_ERR, "There are %.3f seconds missing " "from the timeline!\n", missing_time / 1e9); + talloc_free(mpctx->sources); mpctx->sources = sources; mpctx->num_sources = num_sources; mpctx->timeline = timeline; -- cgit v1.2.3