mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-01 22:58:47 -04:00
modules: Fix entry leak in module-card-restore
CID 1323585 entry_read() allocates an entry which must be freed
This commit is contained in:
parent
d36baaf81e
commit
3193f6a2c4
1 changed files with 4 additions and 1 deletions
|
|
@ -438,12 +438,15 @@ static pa_hook_result_t profile_available_changed_callback(void *hook_data, void
|
|||
if (!entry)
|
||||
return PA_HOOK_OK;
|
||||
|
||||
if (!pa_streq(profile->name, entry->profile))
|
||||
if (!pa_streq(profile->name, entry->profile)) {
|
||||
entry_free(entry);
|
||||
return PA_HOOK_OK;
|
||||
}
|
||||
|
||||
pa_log_info("Card %s profile %s became available, activating.", card->name, profile->name);
|
||||
pa_card_set_profile(profile->card, profile, true);
|
||||
|
||||
entry_free(entry);
|
||||
return PA_HOOK_OK;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue