ALSA: Fix memory leak on error in snd_compr_set_params()
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: NJesper Juhl <jj@chaosbits.net> Acked-by: NVinod Koul <vinod.koul@linux.intel.com> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
Showing
想要评论请 注册 或 登录