forked from external/yambar
module/mpd: free connection object when failing to connect
This commit is contained in:
parent
07d6564e79
commit
500aebe9ef
1 changed files with 1 additions and 0 deletions
|
@ -181,6 +181,7 @@ connect_to_mpd(const struct module *mod)
|
||||||
if (merr != MPD_ERROR_SUCCESS) {
|
if (merr != MPD_ERROR_SUCCESS) {
|
||||||
LOG_WARN("failed to connect to MPD: %s",
|
LOG_WARN("failed to connect to MPD: %s",
|
||||||
mpd_connection_get_error_message(conn));
|
mpd_connection_get_error_message(conn));
|
||||||
|
mpd_connection_free(conn);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue