mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-11-10 03:45:42 +01:00
alsatplg: fix memory-leak in tplg_construct_object_name()
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
9e59c928af
commit
0b8d2dfdcc
1 changed files with 1 additions and 1 deletions
|
@ -1290,13 +1290,13 @@ static int tplg_construct_object_name(struct tplg_pre_processor *tplg_pp, snd_co
|
||||||
|
|
||||||
/* alloc and concat arg value to the name */
|
/* alloc and concat arg value to the name */
|
||||||
temp = tplg_snprintf("%s.%s", new_name, arg_value);
|
temp = tplg_snprintf("%s.%s", new_name, arg_value);
|
||||||
|
free(arg_value);
|
||||||
if (!temp) {
|
if (!temp) {
|
||||||
ret = -ENOMEM;
|
ret = -ENOMEM;
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
free(new_name);
|
free(new_name);
|
||||||
new_name = temp;
|
new_name = temp;
|
||||||
free(arg_value);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = snd_config_set_id(obj, new_name);
|
ret = snd_config_set_id(obj, new_name);
|
||||||
|
|
Loading…
Reference in a new issue