From: Jesper Juhl Date: Tue, 25 Nov 2008 13:57:30 +0000 (-0300) Subject: [media] rc: Fix double free in gpio_ir_recv_probe() X-Git-Tag: v3.9-rc1~93^2~486 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e5d85b9ac3133f67460ea5b2d4e33e0473d6eb4b;p=pandora-kernel.git [media] rc: Fix double free in gpio_ir_recv_probe() At the 'err_request_irq' label, rc_unregister_device(rcdev) frees its argument. So when we fall through to the 'err_gpio_request' label further down and call rc_free_device(rcdev) then that's a double free. Fix that by moving 'rcdev = NULL' from after the call to rc_free_device() to after rc_unregister_device(). That fixes the problem since rc_free_device() just does nothing if passed NULL and there's no further use of 'rcdev' after the call to rc_free_device() so it's not needed there. Signed-off-by: Jesper Juhl Signed-off-by: Mauro Carvalho Chehab --- Reading git-diff-tree failed