aboutsummaryrefslogtreecommitdiffstats
path: root/mpd-notification.c
diff options
context:
space:
mode:
authorChristian Hesse <mail@eworm.de>2015-07-09 16:50:06 +0200
committerChristian Hesse <mail@eworm.de>2015-07-09 16:50:06 +0200
commit1db32933ec6b8fae2d2cc2192fd8e09f9d8ee198 (patch)
tree04ef2ef7fd590063af58e8100acefd42f8cef038 /mpd-notification.c
parentrename define after icon name (diff)
downloadmpd-notification-1db32933ec6b8fae2d2cc2192fd8e09f9d8ee198.tar.gz
mpd-notification-1db32933ec6b8fae2d2cc2192fd8e09f9d8ee198.tar.bz2
mpd-notification-1db32933ec6b8fae2d2cc2192fd8e09f9d8ee198.tar.xz
mpd-notification-1db32933ec6b8fae2d2cc2192fd8e09f9d8ee198.tar.zst
mpd-notification-1db32933ec6b8fae2d2cc2192fd8e09f9d8ee198.zip
always allocate memory for notification string
Diffstat (limited to '')
-rw-r--r--mpd-notification.c6
1 files 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);