output/pipewire: fix memory leak in SendTag()

This commit is contained in:
Max Kellermann 2021-10-20 10:16:10 +02:00
parent c4c64854d4
commit 04bf8a6b1a

View File

@ -666,7 +666,9 @@ PipeWireOutput::SendTag(const Tag &tag)
const char *artist, *title;
const char *medianame = FormatTag(tag, "%artist% - %title%");
char *medianame = FormatTag(tag, "%artist% - %title%");
AtScopeExit(medianame) { free(medianame); };
items[n_items++] = SPA_DICT_ITEM_INIT(PW_KEY_MEDIA_NAME, medianame);
artist = tag.GetValue(TAG_ARTIST);