mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-04-23 20:35:42 +02:00
module/mpd: free album/artist/title before replacing them
This commit is contained in:
parent
f2a3deb362
commit
0103eff3a0
1 changed files with 4 additions and 0 deletions
|
@ -214,6 +214,10 @@ update_status(struct module *mod)
|
||||||
const char *title = mpd_song_get_tag(song, MPD_TAG_TITLE, 0);
|
const char *title = mpd_song_get_tag(song, MPD_TAG_TITLE, 0);
|
||||||
|
|
||||||
mtx_lock(&mod->lock);
|
mtx_lock(&mod->lock);
|
||||||
|
free(m->album);
|
||||||
|
free(m->artist);
|
||||||
|
free(m->title);
|
||||||
|
|
||||||
m->album = strdup(album);
|
m->album = strdup(album);
|
||||||
m->artist = strdup(artist);
|
m->artist = strdup(artist);
|
||||||
m->title = strdup(title);
|
m->title = strdup(title);
|
||||||
|
|
Loading…
Add table
Reference in a new issue