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 if_eval_regex_match()
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
200d18cda7
commit
9b71d53bde
1 changed files with 2 additions and 1 deletions
|
|
@ -160,11 +160,12 @@ static int if_eval_regex_match(snd_use_case_mgr_t *uc_mgr, snd_config_t *eval)
|
|||
if (err < 0)
|
||||
return err;
|
||||
err = regcomp(&re, s, options);
|
||||
free(s);
|
||||
if (err) {
|
||||
uc_error("Regex '%s' compilation failed (code %d)", s, err);
|
||||
free(s);
|
||||
return -EINVAL;
|
||||
}
|
||||
free(s);
|
||||
|
||||
err = uc_mgr_get_substituted_value(uc_mgr, &s, string);
|
||||
if (err < 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue