Input: ALPS - fix memory leak when detection fails
Subsystems (3)
Dmitry Torokhov
maintainerPATCH 1/1 Input: ALPS - fix memory leak when detection fails
This fixes memory leak introduced by commita09221e83e13e09a33109b9b037484eade901cea
Signed-off-by Dmitry Torokhov <[email protected]>
--- drivers/input/mouse/alps.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/input/mouse/alps.c +3 -1
@@ -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" ;
Signature · 5 lines
2.2.0.rc0.207.ga3a616c -- Dmitry
Quoted 14 lines · On Saturday 28 February 2015 00:53:57 Dmitry Torokhov wrote:
This fixes memory leak introduced by commit
a09221e83e13e09a33109b9b037484eade901ceaSigned-off-by Dmitry Torokhov <[email protected]>--- drivers/input/mouse/alps.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)(quoted diff) +0
-0
b/drivers/input/mouse/alps.cindex d28726a..1bd15eb 100644drivers/input/mouse/alps.c +0
-0@@ -2605,8 +2605,10 @@ int alps_detect(struct psmouse *psmouse, bool set_properties) return -ENOMEM;
drivers/input/mouse/alps.c int alps_detect(struct psmouse · line 2614
Quoted 10 lines
drivers/input/mouse/alps.c +3
-1error =alps_identify (psmouse, priv); -if (error) +if (error) { +kfree (priv);return error; + }if (set_properties) { psmouse->vendor ="ALPS" ;
Acked-by Pali Rohár <[email protected]>
Signature · 2 lines
Pali Rohár [email protected]