ALSA: Fix memory leak on error in snd_compr_set_params()
authorJesper Juhl <jj@chaosbits.net>
Mon, 23 Jan 2012 20:02:57 +0000 (21:02 +0100)
committerTakashi Iwai <tiwai@suse.de>
Tue, 24 Jan 2012 14:29:32 +0000 (15:29 +0100)
If copy_from_user() does not return 0 we'll leak the memory we
allocated for 'params' when that variable goes out of scope.

Also a small CodingStyle cleanup: Use braces on both branches of
if/else when one branch needs it.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Acked-by: Vinod Koul <vinod.koul@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>

No differences found