mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2026-03-05 01:40:11 -05:00
ucm: fix use-after-free in parse_component_seq()
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
141acab892
commit
6eb78d41a1
1 changed files with 2 additions and 1 deletions
|
|
@ -617,11 +617,12 @@ static int parse_component_seq(snd_use_case_mgr_t *uc_mgr,
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
cmpt_seq->device = find_component_dev(uc_mgr, val);
|
cmpt_seq->device = find_component_dev(uc_mgr, val);
|
||||||
free(val);
|
|
||||||
if (!cmpt_seq->device) {
|
if (!cmpt_seq->device) {
|
||||||
uc_error("error: Cannot find component device %s", val);
|
uc_error("error: Cannot find component device %s", val);
|
||||||
|
free(val);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
free(val);
|
||||||
|
|
||||||
/* Parent needs its enable or disable sequence */
|
/* Parent needs its enable or disable sequence */
|
||||||
cmpt_seq->enable = enable;
|
cmpt_seq->enable = enable;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue