[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200810061500.9329-1-dinghao.liu@zju.edu.cn>
Date: Mon, 10 Aug 2020 14:14:58 +0800
From: Dinghao Liu <dinghao.liu@....edu.cn>
To: dinghao.liu@....edu.cn, kjlu@....edu
Cc: Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.com>,
Mark Hills <mark@...x.org>,
Dan Carpenter <dan.carpenter@...cle.com>,
Arnd Bergmann <arnd@...db.de>,
Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>,
Takashi Sakamoto <o-takashi@...amocchi.jp>,
Giuliano Pochini <pochini@...ny.it>,
alsa-devel@...a-project.org, linux-kernel@...r.kernel.org
Subject: [PATCH] ALSA: echoaudio: Fix memory leak in snd_echo_resume()
When restore_dsp_rettings() fails, chip should be freed
just like when init_hw() and request_irq() fails.
Fixes: 47b5d028fdce8 ("ALSA: Echoaudio - Add suspend support #2")
Signed-off-by: Dinghao Liu <dinghao.liu@....edu.cn>
---
sound/pci/echoaudio/echoaudio.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/pci/echoaudio/echoaudio.c b/sound/pci/echoaudio/echoaudio.c
index 6aeb99aa2414..2aa183fe5dc1 100644
--- a/sound/pci/echoaudio/echoaudio.c
+++ b/sound/pci/echoaudio/echoaudio.c
@@ -2226,6 +2226,7 @@ static int snd_echo_resume(struct device *dev)
chip->pipe_alloc_mask = pipe_alloc_mask;
if (err < 0) {
kfree(commpage_bak);
+ snd_echo_free(chip);
return err;
}
--
2.17.1
Powered by blists - more mailing lists