From 66d1ec994cb3e98d73a7847d6cd516aceebd6fdf Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sat, 6 Jun 2009 09:16:21 +0000 Subject: zr364xx.c: vfree does its own NULL check From: Figo.zhang vfree() does it's own NULL checking, no need for explicit check before calling it. Signed-off-by: Figo.zhang Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/zr364xx.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'linux') diff --git a/linux/drivers/media/video/zr364xx.c b/linux/drivers/media/video/zr364xx.c index b8f47acab..8746f067d 100644 --- a/linux/drivers/media/video/zr364xx.c +++ b/linux/drivers/media/video/zr364xx.c @@ -883,9 +883,11 @@ static void zr364xx_disconnect(struct usb_interface *intf) video_unregister_device(cam->vdev); cam->vdev = NULL; kfree(cam->buffer); - if (cam->framebuf) - vfree(cam->framebuf); + cam->buffer = NULL; + vfree(cam->framebuf); + cam->framebuf = NULL; kfree(cam); + cam = NULL; } -- cgit v1.2.3