Close topology config file after parsing it.

Signed-off-by: Nathan Mills <the.true.nathan.mills@gmail.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
Quipyowert2 2019-02-17 03:38:16 -08:00 committed by Jaroslav Kysela
parent 369df32257
commit 1181bfc458

View file

@ -121,6 +121,12 @@ static int tplg_parse_data_file(snd_config_t *cfg, struct tplg_elem *elem)
elem->data = priv; elem->data = priv;
priv->size = size; priv->size = size;
elem->size = sizeof(*priv) + size; elem->size = sizeof(*priv) + size;
if (fclose(fp) == EOF) {
SNDERR("Cannot close data file.");
ret = -errno;
goto err;
}
return 0; return 0;
err: err: