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:07:31 +0300 |
commit | e3d94870b39f533651f5dc45b590f0af6e02cdff (patch) | |
tree | aae9844ca65af80222bc809688355a24ca51af49 /sound | |
parent | be6d42cd5c1eb6d3ab6d921aa054b780b5fa7639 (diff) | |
download | linux-e3d94870b39f533651f5dc45b590f0af6e02cdff.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 474b06d8acd1..866b2803edb5 100644 --- a/sound/firewire/oxfw/oxfw.c +++ b/sound/firewire/oxfw/oxfw.c @@ -275,6 +275,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); } |