alsatplg: fix another small leak in normalize_config()

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
Jaroslav Kysela 2019-12-13 10:44:36 +01:00
parent 2656d4bec8
commit 10db898d9b

View 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;