]> git.alsa-project.org Git - alsa-utils.git/commitdiff
alsatplg: fix another small leak in normalize_config()
authorJaroslav Kysela <perex@perex.cz>
Fri, 13 Dec 2019 09:44:36 +0000 (10:44 +0100)
committerJaroslav Kysela <perex@perex.cz>
Fri, 13 Dec 2019 09:44:36 +0000 (10:44 +0100)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
topology/topology.c

index c12be7806929f3b1345edddb725afc3aecca7dd5..bc5797c5f14f541e6c6f468981f77c89cf09a9f0 100644 (file)
@@ -98,6 +98,8 @@ static snd_config_t *normalize_config(const char *id, snd_config_t *src, int sor
                }
                s = normalize_config(id2, s, sort);
                if (s == NULL || snd_config_add(dst, s)) {
+                       if (s)
+                               snd_config_delete(s);
                        snd_config_delete(dst);
                        free(a);
                        return NULL;