]> git.alsa-project.org Git - alsa-lib.git/commitdiff
Close topology config file after parsing it.
authorQuipyowert2 <38995150+Quipyowert2@users.noreply.github.com>
Sun, 17 Feb 2019 11:38:16 +0000 (03:38 -0800)
committerJaroslav Kysela <perex@perex.cz>
Tue, 9 Apr 2019 08:27:36 +0000 (10:27 +0200)
Signed-off-by: Nathan Mills <the.true.nathan.mills@gmail.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
src/topology/data.c

index 70a63d4a1fb919912405a3e4bf13c3c982c1d35e..fd72abbb5e08f8ac04a1a144ba2a243179531176 100644 (file)
@@ -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: