From: Quipyowert2 <38995150+Quipyowert2@users.noreply.github.com> Date: Sun, 17 Feb 2019 11:38:16 +0000 (-0800) Subject: Close topology config file after parsing it. X-Git-Tag: v1.1.9~9 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=1181bfc4586ffca44498a64355feac1862f694ba;p=alsa-lib.git Close topology config file after parsing it. Signed-off-by: Nathan Mills Signed-off-by: Jaroslav Kysela --- diff --git a/src/topology/data.c b/src/topology/data.c index 70a63d4a..fd72abbb 100644 --- a/src/topology/data.c +++ b/src/topology/data.c @@ -121,6 +121,12 @@ static int tplg_parse_data_file(snd_config_t *cfg, struct tplg_elem *elem) elem->data = priv; priv->size = size; elem->size = sizeof(*priv) + size; + + if (fclose(fp) == EOF) { + SNDERR("Cannot close data file."); + ret = -errno; + goto err; + } return 0; err: