From 8cbd7075950eaf70decee134431e3b25e5e726f7 Mon Sep 17 00:00:00 2001 From: Quipyowert2 <38995150+Quipyowert2@users.noreply.github.com> Date: Sun, 17 Feb 2019 03:38:16 -0800 Subject: [PATCH] Close topology config file after parsing it. Signed-off-by: Nathan Mills --- src/topology/data.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/topology/data.c b/src/topology/data.c index 6b7c3f6c..c37e0c26 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: