Skip to content

Commit d992909

Browse files
takaswiegregkh
authored andcommitted
ALSA: fireworks: fix memory leak of response buffer at error path
commit c3b55e2 upstream. 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: 7d3c1d5('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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 40e2596 commit d992909

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

sound/firewire/fireworks/fireworks.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,8 @@ do_registration(struct work_struct *work)
301301
snd_efw_transaction_remove_instance(efw);
302302
snd_efw_stream_destroy_duplex(efw);
303303
snd_card_free(efw->card);
304+
kfree(efw->resp_buf);
305+
efw->resp_buf = NULL;
304306
dev_info(&efw->unit->device,
305307
"Sound card registration failed: %d\n", err);
306308
}

0 commit comments

Comments
 (0)