Skip to content

Commit ce925f0

Browse files
takaswietiwai
authored andcommitted
ALSA: oxfw: fix memory leak for model-dependent data at error path
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: <[email protected]> # v4.7+ Signed-off-by: Takashi Sakamoto <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
1 parent b1fbebd commit ce925f0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sound/firewire/oxfw/oxfw.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,8 @@ static void do_registration(struct work_struct *work)
271271
if (oxfw->has_output)
272272
snd_oxfw_stream_destroy_simplex(oxfw, &oxfw->tx_stream);
273273
snd_card_free(oxfw->card);
274+
kfree(oxfw->spec);
275+
oxfw->spec = NULL;
274276
dev_info(&oxfw->unit->device,
275277
"Sound card registration failed: %d\n", err);
276278
}

0 commit comments

Comments
 (0)