提交 93050db2 编写于 作者: D Dmitry Torokhov

Input: ALPS - fix memory leak when detection fails

This fixes memory leak introduced by commit
a09221e8Acked-by: NPali Rohár <pali.rohar@gmail.com>
Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
上级 4a6155a4
......@@ -2605,8 +2605,10 @@ int alps_detect(struct psmouse *psmouse, bool set_properties)
return -ENOMEM;
error = alps_identify(psmouse, priv);
if (error)
if (error) {
kfree(priv);
return error;
}
if (set_properties) {
psmouse->vendor = "ALPS";
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册