diff options
author | Christian Hesse <mail@eworm.de> | 2015-07-09 16:50:06 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2015-07-09 16:50:06 +0200 |
commit | 1db32933ec6b8fae2d2cc2192fd8e09f9d8ee198 (patch) | |
tree | 04ef2ef7fd590063af58e8100acefd42f8cef038 /mpd-notification.c | |
parent | d603590d744cfc4ee0305244e9447e61c43c400d (diff) | |
download | mpd-notification-1db32933ec6b8fae2d2cc2192fd8e09f9d8ee198.tar.gz mpd-notification-1db32933ec6b8fae2d2cc2192fd8e09f9d8ee198.tar.zst |
always allocate memory for notification string
Diffstat (limited to 'mpd-notification.c')
-rw-r--r-- | mpd-notification.c | 6 |
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); |