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:
Clemens Ladisch 2008-01-14 08:53:06 +01:00
parent fb3a4e8b70
commit 50ce5d049e

View file

@ -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--;