Input: adxl34x - fix leak and use after free
These are a couple smatch issues. In the original code, if only one of the allocation fails we leak the other variable so we should goto out_free_mem. Also there was a use after free if debugging was enabled and so I moved the kfree() down a line. Signed-off-by: NDan Carpenter <error27@gmail.com> Signed-off-by: NDmitry Torokhov <dtor@mail.ru>
Showing
想要评论请 注册 或 登录