Skip to content

Commit

Permalink
Fix sh_keysc double free
Browse files Browse the repository at this point in the history
Avoid double free situation from happening by removing input_free_device()
after input_unregister_device(). Suggested by Dmitry Torokhov.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
  • Loading branch information
Magnus Damm authored and Paul Mundt committed Apr 18, 2008
1 parent 9460c0c commit 6dea781
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/input/keyboard/sh_keysc.c
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,6 @@ static int __devexit sh_keysc_remove(struct platform_device *pdev)

input_unregister_device(priv->input);
free_irq(platform_get_irq(pdev, 0), pdev);
input_free_device(priv->input);
iounmap(priv->iomem_base);

res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
Expand Down

0 comments on commit 6dea781

Please sign in to comment.