diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2018-09-17 11:26:08 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-09-29 13:06:03 +0300 |
commit | 996899a9cbd85b05804b80574ff4290d27913693 (patch) | |
tree | ed7dee053c282c5f2e217c874a8e59a987797965 /sound | |
parent | d9929097176dc69d993715b80983bdbca06307e7 (diff) | |
download | linux-996899a9cbd85b05804b80574ff4290d27913693.tar.xz |
ALSA: oxfw: fix memory leak for model-dependent data at error path
commit ce925f088b979537f22f9e05eb923ef9822ca139 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: 6c29230e2a5f ('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>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/firewire/oxfw/oxfw.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/firewire/oxfw/oxfw.c b/sound/firewire/oxfw/oxfw.c index 413ab6313bb6..d696d548c23a 100644 --- a/sound/firewire/oxfw/oxfw.c +++ b/sound/firewire/oxfw/oxfw.c @@ -276,6 +276,8 @@ error: if (oxfw->has_output) snd_oxfw_stream_destroy_simplex(oxfw, &oxfw->tx_stream); snd_card_free(oxfw->card); + kfree(oxfw->spec); + oxfw->spec = NULL; dev_info(&oxfw->unit->device, "Sound card registration failed: %d\n", err); } |