mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
fix memory leak in snd_config_update_r error path
Do not forget to free the memory for the file name when a file to be read by snd_config_update_r() cannot be accessed.
This commit is contained in:
parent
fb3a4e8b70
commit
50ce5d049e
1 changed files with 1 additions and 0 deletions
|
|
@ -3007,6 +3007,7 @@ int snd_config_update_r(snd_config_t **_top, snd_config_update_t **_update, cons
|
|||
lf->mtime = st.st_mtime;
|
||||
} else {
|
||||
SNDERR("Cannot access file %s", lf->name);
|
||||
free(lf->name);
|
||||
memmove(&local->finfo[k], &local->finfo[k+1], sizeof(struct finfo) * (local->count - k - 1));
|
||||
k--;
|
||||
local->count--;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue