mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-12-21 08:56:46 -05:00
modules: fix some small memory leaks
This commit is contained in:
parent
1778f76c78
commit
9315bbdfe5
2 changed files with 4 additions and 1 deletions
|
|
@ -562,7 +562,7 @@ static pa_hook_result_t card_choose_initial_profile_callback(pa_core *core, pa_c
|
||||||
if (!u->restore_bluetooth_profile) {
|
if (!u->restore_bluetooth_profile) {
|
||||||
const char *s = pa_proplist_gets(card->proplist, PA_PROP_DEVICE_BUS);
|
const char *s = pa_proplist_gets(card->proplist, PA_PROP_DEVICE_BUS);
|
||||||
if (pa_safe_streq(s, "bluetooth"))
|
if (pa_safe_streq(s, "bluetooth"))
|
||||||
return PA_HOOK_OK;
|
goto finish;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e->profile[0]) {
|
if (e->profile[0]) {
|
||||||
|
|
@ -582,6 +582,7 @@ static pa_hook_result_t card_choose_initial_profile_callback(pa_core *core, pa_c
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
finish:
|
||||||
entry_free(e);
|
entry_free(e);
|
||||||
|
|
||||||
return PA_HOOK_OK;
|
return PA_HOOK_OK;
|
||||||
|
|
|
||||||
|
|
@ -343,8 +343,10 @@ int pa__init(pa_module*m) {
|
||||||
|
|
||||||
if (!format) {
|
if (!format) {
|
||||||
pa_log(_("Failed to set format: invalid format string %s"), f);
|
pa_log(_("Failed to set format: invalid format string %s"), f);
|
||||||
|
pa_xfree(f);
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
pa_xfree(f);
|
||||||
|
|
||||||
pa_idxset_put(u->formats, format, NULL);
|
pa_idxset_put(u->formats, format, NULL);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue