Skip to content
Commit f1cba532 authored by Dan Carpenter's avatar Dan Carpenter Committed by Dmitry Torokhov
Browse files

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: default avatarDan Carpenter <error27@gmail.com>
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent 0fffed27
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment