mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-03 09:01:50 -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
|
|
@ -246,14 +246,13 @@ static void subscribe_callback(pa_core *c, pa_subscription_event_type_t t, uint3
|
|||
t != (PA_SUBSCRIPTION_EVENT_CARD|PA_SUBSCRIPTION_EVENT_CHANGE))
|
||||
return;
|
||||
|
||||
entry = entry_new();
|
||||
|
||||
if (!(card = pa_idxset_get_by_index(c->cards, idx)))
|
||||
return;
|
||||
|
||||
if (!card->save_profile)
|
||||
return;
|
||||
|
||||
entry = entry_new();
|
||||
entry->profile = pa_xstrdup(card->active_profile ? card->active_profile->name : "");
|
||||
|
||||
if ((old = entry_read(u, card->name))) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue