pulse-server: fix property key remove

This commit is contained in:
Wim Taymans 2020-10-21 12:03:45 +02:00
parent 66173e4257
commit 48d1b8d57d

View file

@ -1893,9 +1893,8 @@ static int do_remove_proplist(struct client *client, uint32_t command, uint32_t
pw_properties_set(props, key, key); pw_properties_set(props, key, key);
} }
items = alloca(sizeof(struct spa_dict_item) * dict.n_items);
dict.n_items = props->dict.n_items; dict.n_items = props->dict.n_items;
dict.items = items; dict.items = items = alloca(sizeof(struct spa_dict_item) * dict.n_items);
for (i = 0; i < dict.n_items; i++) { for (i = 0; i < dict.n_items; i++) {
items[i].key = props->dict.items[i].key; items[i].key = props->dict.items[i].key;
items[i].value = NULL; items[i].value = NULL;