mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 19:00:25 +00:00
Input: ALPS - fix memory leak when detection fails
This fixes memory leak introduced by commit
a09221e83e
Acked-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
This commit is contained in:
parent
4a6155a465
commit
93050db206
1 changed files with 3 additions and 1 deletions
|
@ -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";
|
||||
|
|
Loading…
Reference in a new issue