From 500aebe9ef20e038e84d5c49eed22ada730ffdf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Sun, 30 Dec 2018 14:04:40 +0100 Subject: [PATCH] module/mpd: free connection object when failing to connect --- modules/mpd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/mpd.c b/modules/mpd.c index 0d1f4d0..5c7227a 100644 --- a/modules/mpd.c +++ b/modules/mpd.c @@ -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; }