Skip to content

Commit c3b55e2

Browse files
takaswietiwai
authored andcommitted
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: 7d3c1d5('ALSA: fireworks: delayed registration of sound card') Cc: <[email protected]> # v4.7+ Signed-off-by: Takashi Sakamoto <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
1 parent 1064bc6 commit c3b55e2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

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)