mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-02 09:01:48 -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;
|
||||
|
||||
cmpt_seq->device = find_component_dev(uc_mgr, val);
|
||||
free(val);
|
||||
if (!cmpt_seq->device) {
|
||||
uc_error("error: Cannot find component device %s", val);
|
||||
free(val);
|
||||
return -EINVAL;
|
||||
}
|
||||
free(val);
|
||||
|
||||
/* Parent needs its enable or disable sequence */
|
||||
cmpt_seq->enable = enable;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue