Skip to content

Commit 996899a

Browse files
takaswiegregkh
authored andcommitted
ALSA: oxfw: fix memory leak for model-dependent data at error path
commit ce925f0 upstream. After allocating model-dependent data, ALSA OXFW driver has memory leak of the data at error path. This commit releases the data at the error path. Fixes: 6c29230 ('ALSA: oxfw: 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 d992909 commit 996899a

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

sound/firewire/oxfw/oxfw.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,8 @@ static void do_registration(struct work_struct *work)
276276
if (oxfw->has_output)
277277
snd_oxfw_stream_destroy_simplex(oxfw, &oxfw->tx_stream);
278278
snd_card_free(oxfw->card);
279+
kfree(oxfw->spec);
280+
oxfw->spec = NULL;
279281
dev_info(&oxfw->unit->device,
280282
"Sound card registration failed: %d\n", err);
281283
}

0 commit comments

Comments
 (0)