Fix a memory leak in mpd_client_parse_line()

This commit is contained in:
Přemysl Eric Janouch 2020-10-12 02:05:51 +02:00
parent 1cd9ba8d97
commit 9b72304963
Signed by: p
GPG Key ID: A0420B94F92B9493

View File

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