mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-02 09:01:46 -05:00
Use pa_hashmap_remove_and_free() where appropriate
This commit is contained in:
parent
14e2553185
commit
eca082a93f
14 changed files with 29 additions and 84 deletions
|
|
@ -396,14 +396,11 @@ static void device_info_free(struct device_info *d) {
|
|||
}
|
||||
|
||||
static pa_hook_result_t device_unlink_hook_cb(pa_core *c, pa_object *o, struct userdata *u) {
|
||||
struct device_info *d;
|
||||
|
||||
pa_assert(c);
|
||||
pa_object_assert_ref(o);
|
||||
pa_assert(u);
|
||||
|
||||
if ((d = pa_hashmap_remove(u->device_infos, o)))
|
||||
device_info_free(d);
|
||||
pa_hashmap_remove_and_free(u->device_infos, o);
|
||||
|
||||
return PA_HOOK_OK;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue