mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-10 13:29:58 -05:00
Plug some memory leaks and an invalid read
Note in protocol-dbus.c specifically, method_signatures needs to be freed before method_handlers, because otherwise h->method_name is freed while it is still in use as a key in the method_signatures hashmap.
This commit is contained in:
parent
a8f20e8d95
commit
b430407f47
5 changed files with 6 additions and 3 deletions
|
|
@ -113,6 +113,7 @@ void pa_flist_free(pa_flist *l, pa_free_cb_t free_cb) {
|
|||
free_cb(pa_atomic_ptr_load(&elem->ptr));
|
||||
}
|
||||
|
||||
pa_xfree((char *) l->name);
|
||||
pa_xfree(l);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -839,8 +839,8 @@ int pa_dbus_protocol_remove_interface(pa_dbus_protocol *p, const char* path, con
|
|||
pa_log_debug("Interface %s removed from object %s", iface_entry->name, obj_entry->path);
|
||||
|
||||
pa_xfree(iface_entry->name);
|
||||
pa_hashmap_free(iface_entry->method_handlers, method_handler_free_cb, NULL);
|
||||
pa_hashmap_free(iface_entry->method_signatures, method_signature_free_cb, NULL);
|
||||
pa_hashmap_free(iface_entry->method_handlers, method_handler_free_cb, NULL);
|
||||
pa_hashmap_free(iface_entry->property_handlers, property_handler_free_cb, NULL);
|
||||
|
||||
for (i = 0; i < iface_entry->n_signals; ++i) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue