From 7bf50fd8ed1fc766b60559696e50f0af5bc361cf Mon Sep 17 00:00:00 2001 From: Julian Bouzas Date: Thu, 8 Jul 2021 14:34:09 -0400 Subject: [PATCH] spa: alsa: acp: free device name in add_pro_profile --- spa/plugins/alsa/acp/acp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spa/plugins/alsa/acp/acp.c b/spa/plugins/alsa/acp/acp.c index cceed935f..8df3d4e13 100644 --- a/spa/plugins/alsa/acp/acp.c +++ b/spa/plugins/alsa/acp/acp.c @@ -318,8 +318,10 @@ static int add_pro_profile(pa_card *impl, uint32_t index) if ((err = snd_ctl_open(&ctl_hndl, device, 0)) < 0) { pa_log_error("can't open control for card %s: %s", device, snd_strerror(err)); + free(device); return err; } + free(device); snd_pcm_info_alloca(&pcminfo);