module/mpd: free connection object when failing to connect

This commit is contained in:
Daniel Eklöf 2018-12-30 14:04:40 +01:00
parent 07d6564e79
commit 500aebe9ef

View file

@ -181,6 +181,7 @@ connect_to_mpd(const struct module *mod)
if (merr != MPD_ERROR_SUCCESS) {
LOG_WARN("failed to connect to MPD: %s",
mpd_connection_get_error_message(conn));
mpd_connection_free(conn);
return NULL;
}