From 50ce5d049e1319fe30445fb3424a36027b4e8a4c Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Mon, 14 Jan 2008 08:53:06 +0100 Subject: [PATCH] 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. --- src/conf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/conf.c b/src/conf.c index 4389c977..32a76085 100644 --- a/src/conf.c +++ b/src/conf.c @@ -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--; -- 2.47.1