From 47779e59e7c3dd834f6c4d3f8866dcca537d7e3c Mon Sep 17 00:00:00 2001 From: ejurgensen Date: Mon, 10 Aug 2020 22:00:25 +0200 Subject: [PATCH] [input] Fix memleak of path when seting up a new input file Credit @whatdoineed2do Closes #1067 --- src/input.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/input.c b/src/input.c index a890a909..da339467 100644 --- a/src/input.c +++ b/src/input.c @@ -410,6 +410,9 @@ setup(struct input_source *source, struct db_queue_item *queue_item, int seek_ms if ((type < 0) || (inputs[type]->disabled)) goto setup_error; + // Avoids memleaks in cases where stop() is not called + clear(source); + source->type = type; source->data_kind = queue_item->data_kind; source->media_kind = queue_item->media_kind;