Skip to content

Commit

Permalink
[media] rc: Fix double free in gpio_ir_recv_remove()
Browse files Browse the repository at this point in the history
Since rc_unregister_device() frees its argument there's no need to
subsequently call rc_free_device() on the same variable - in fact it's
a double free bug.
Easily fixed by just removing the rc_free_device() call.

Signed-off-by: Jesper Juhl <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
  • Loading branch information
jjuhl authored and Mauro Carvalho Chehab committed Dec 21, 2012
1 parent e5d85b9 commit bbe2a1d
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/media/rc/gpio-ir-recv.c
Original file line number Diff line number Diff line change
@@ -148,7 +148,6 @@ static int __devexit gpio_ir_recv_remove(struct platform_device *pdev)
platform_set_drvdata(pdev, NULL);
rc_unregister_device(gpio_dev->rcdev);
gpio_free(gpio_dev->gpio_nr);
rc_free_device(gpio_dev->rcdev);
kfree(gpio_dev);
return 0;
}

0 comments on commit bbe2a1d

Please sign in to comment.