From 1bd07952245e3fc8ed95af0c1eff45938098b40b Mon Sep 17 00:00:00 2001 From: Louis Burda Date: Sun, 12 Dec 2021 23:06:54 +0100 Subject: Added playback via libmpdclient --- history.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'history.c') diff --git a/history.c b/history.c index 5e2144e..f933272 100644 --- a/history.c +++ b/history.c @@ -39,12 +39,15 @@ history_free(struct history *history) struct link *iter, *next; struct inputln *ln; - for (iter = &history->list; iter; iter = next) { + for (iter = history->list.next; iter; iter = next) { next = iter->next; ln = UPCAST(iter, struct inputln); free(ln); } - free(history->cmd); + history->list = LIST_HEAD; + free(history->query); + history->query = NULL; + history->cmd = NULL; } struct inputln * -- cgit v1.2.3-71-gd317