Skip to content

Commit

Permalink
Input: psmouse - fix input_dev leak in lifebook driver
Browse files Browse the repository at this point in the history
The lifebook driver may register a second input device, but it never
unregisters it.  This fixes that.

Signed-off-by: Andres Salomon <dilinger@debian.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
  • Loading branch information
Andres Salomon authored and Dmitry Torokhov committed Jan 17, 2008
1 parent 746b31a commit 653e91d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion drivers/input/mouse/lifebook.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,13 @@ static void lifebook_set_resolution(struct psmouse *psmouse, unsigned int resolu

static void lifebook_disconnect(struct psmouse *psmouse)
{
struct lifebook_data *priv = psmouse->private;

psmouse_reset(psmouse);
kfree(psmouse->private);
if (priv) {
input_unregister_device(priv->dev2);
kfree(priv);
}
psmouse->private = NULL;
}

Expand Down

0 comments on commit 653e91d

Please sign in to comment.