control: remap - fix memory leak in remap_load_list()

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
Jaroslav Kysela 2026-02-12 11:15:55 +01:00
parent 22225a4ec6
commit 1823b4cd4b

View file

@ -564,8 +564,7 @@ static int remap_load_list(snd_ctl_remap_t *remap)
if (err < 0) if (err < 0)
break; break;
} while (list.count != list.used); } while (list.count != list.used);
if (err < 0) snd_ctl_elem_list_free_space(&list);
free(list.pids);
return err; return err;
} }