metadata: clear item before remove

Otherwise the item is overwritten with the next entry and we should
not clear it.
This commit is contained in:
Wim Taymans 2020-12-09 21:18:58 +01:00
parent 0237821b38
commit 760a63d340

View file

@ -192,8 +192,8 @@ static int impl_set_property(void *object,
item = find_item(this, subject, key);
if (value == NULL) {
if (item != NULL) {
pw_array_remove(&this->metadata, item);
clear_item(item);
pw_array_remove(&this->metadata, item);
type = NULL;
changed++;
pw_log_info(NAME" %p: remove id:%d key:%s", this,