mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-31 22:25:35 -04:00
confmisc: fix memory leak in snd_func_concat
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
36aff79747
commit
a92ad2fea4
1 changed files with 1 additions and 2 deletions
|
|
@ -419,7 +419,6 @@ int snd_func_concat(snd_config_t **dst, snd_config_t *root, snd_config_t *src,
|
|||
tmp = realloc(res, len + len1 + 1);
|
||||
if (tmp == NULL) {
|
||||
free(ptr);
|
||||
free(res);
|
||||
err = -ENOMEM;
|
||||
goto __error;
|
||||
}
|
||||
|
|
@ -440,8 +439,8 @@ int snd_func_concat(snd_config_t **dst, snd_config_t *root, snd_config_t *src,
|
|||
err = snd_config_get_id(src, &id);
|
||||
if (err >= 0)
|
||||
err = snd_config_imake_string(dst, id, res);
|
||||
free(res);
|
||||
__error:
|
||||
free(res);
|
||||
return err;
|
||||
}
|
||||
#ifndef DOC_HIDDEN
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue