From 9b723049635329feda63fab675df794e429aa151 Mon Sep 17 00:00:00 2001 From: Přemysl Eric Janouch
Date: Mon, 12 Oct 2020 02:05:51 +0200 Subject: Fix a memory leak in mpd_client_parse_line() --- liberty-proto.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/liberty-proto.c b/liberty-proto.c index a605f37..f7a62fd 100644 --- a/liberty-proto.c +++ b/liberty-proto.c @@ -1567,13 +1567,12 @@ mpd_client_parse_line (struct mpd_client *self, const char *line) if (!strcmp (line, "list_OK")) strv_append_owned (&self->data, NULL); else if (mpd_client_parse_response (line, &response)) - { mpd_client_dispatch (self, &response); - free (response.current_command); - free (response.message_text); - } else strv_append (&self->data, line); + + free (response.current_command); + free (response.message_text); return true; } -- cgit v1.2.3-70-g09d2