From 6b9878490ecd4c46326fd1b022baeace7947cdb4 Mon Sep 17 00:00:00 2001 From: chme Date: Mon, 17 Apr 2017 07:38:20 +0200 Subject: [PATCH] [mpd] Add missing free in channel_outputvolume --- src/mpd.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mpd.c b/src/mpd.c index ae74d4e2..6b017b23 100644 --- a/src/mpd.c +++ b/src/mpd.c @@ -3735,6 +3735,7 @@ channel_outputvolume(const char *message) ptr = strrchr(tmp, ':'); if (!ptr) { + free(tmp); DPRINTF(E_LOG, L_MPD, "Failed to parse output id and volume from message '%s' (expected format: \"output-id:volume\"\n", message); return; } @@ -3760,6 +3761,8 @@ channel_outputvolume(const char *message) outputvolume_set(shortid, volume, &errmsg); if (errmsg) DPRINTF(E_LOG, L_MPD, "Failed to set output volume from message: '%s' (error='%s')\n", message, errmsg); + + free(tmp); } static void