aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2018-09-17 04:26:41 -0400
committerTakashi Iwai <tiwai@suse.de>2018-09-17 07:41:14 -0400
commitc3b55e2ec9c76e7a0de2a0b1dc851fdc9440385b (patch)
treef79472179806210280cb49c62be68b2260030424
parent1064bc685d359f549f91c2d5f111965a9284f328 (diff)
ALSA: fireworks: fix memory leak of response buffer at error path
After allocating memory object for response buffer, ALSA fireworks driver has leak of the memory object at error path. This commit releases the object at the error path. Fixes: 7d3c1d5901aa('ALSA: fireworks: delayed registration of sound card') Cc: <stable@vger.kernel.org> # v4.7+ Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/firewire/fireworks/fireworks.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/firewire/fireworks/fireworks.c b/sound/firewire/fireworks/fireworks.c
index 71a0613d3da0..f2d073365cf6 100644
--- a/sound/firewire/fireworks/fireworks.c
+++ b/sound/firewire/fireworks/fireworks.c
@@ -301,6 +301,8 @@ error:
301 snd_efw_transaction_remove_instance(efw); 301 snd_efw_transaction_remove_instance(efw);
302 snd_efw_stream_destroy_duplex(efw); 302 snd_efw_stream_destroy_duplex(efw);
303 snd_card_free(efw->card); 303 snd_card_free(efw->card);
304 kfree(efw->resp_buf);
305 efw->resp_buf = NULL;
304 dev_info(&efw->unit->device, 306 dev_info(&efw->unit->device,
305 "Sound card registration failed: %d\n", err); 307 "Sound card registration failed: %d\n", err);
306} 308}