map: don't mix insert_at() and _remove()

You are supposed to allocate with _insert_new()/_remove() or use
someone elses allocated number with _insert_at(), never mix the
two or it will give an error.
This commit is contained in:
Wim Taymans 2021-10-28 09:34:36 +02:00
parent f6b1d65e35
commit f39f9b207b
2 changed files with 3 additions and 3 deletions

View file

@ -369,7 +369,7 @@ static int destroy_global(void *obj, void *data)
if (global == NULL)
return 0;
pw_map_remove(&global->rd->globals, global->id);
pw_map_insert_at(&global->rd->globals, global->id, NULL);
pw_properties_free(global->properties);
free(global->type);
free(global);