From 1db32933ec6b8fae2d2cc2192fd8e09f9d8ee198 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Thu, 9 Jul 2015 16:50:06 +0200 Subject: always allocate memory for notification string --- mpd-notification.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mpd-notification.c b/mpd-notification.c index 0194607..11443b0 100644 --- a/mpd-notification.c +++ b/mpd-notification.c @@ -334,11 +334,11 @@ int main(int argc, char ** argv) { mpd_song_free(song); } else if (state == MPD_STATE_PAUSE) - notifystr = TEXT_PAUSE; + notifystr = strdup(TEXT_PAUSE); else if (state == MPD_STATE_STOP) - notifystr = TEXT_STOP; + notifystr = strdup(TEXT_STOP); else - notifystr = TEXT_UNKNOWN; + notifystr = strdup(TEXT_UNKNOWN); if (verbose > 0) printf("%s: %s\n", program, notifystr); -- cgit v1.2.3-70-g09d2