From: Jaroslav Kysela Date: Fri, 13 Dec 2019 09:44:36 +0000 (+0100) Subject: alsatplg: fix another small leak in normalize_config() X-Git-Tag: v1.2.2~27 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=10db898d9b97f0a8d3093405ad5b4aa4ed53801d;p=alsa-utils.git alsatplg: fix another small leak in normalize_config() Signed-off-by: Jaroslav Kysela --- diff --git a/topology/topology.c b/topology/topology.c index c12be78..bc5797c 100644 --- a/topology/topology.c +++ b/topology/topology.c @@ -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;