From: Figo.zhang Date: Sat, 6 Jun 2009 09:16:21 +0000 (-0300) Subject: V4L/DVB (11995): zr364xx.c: vfree does its own NULL check X-Git-Tag: firefly_0821_release~13887^2~62 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=de99d76aa19994f0d1140b1397fc439525e147c0;p=firefly-linux-kernel-4.4.55.git V4L/DVB (11995): zr364xx.c: vfree does its own NULL check 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 --- diff --git a/drivers/media/video/zr364xx.c b/drivers/media/video/zr364xx.c index ac169c9eb18d..fc976f42f432 100644 --- a/drivers/media/video/zr364xx.c +++ b/drivers/media/video/zr364xx.c @@ -882,9 +882,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; }