]> Pileus Git - ~andy/linux/commitdiff
V4L/DVB (11995): zr364xx.c: vfree does its own NULL check
authorFigo.zhang <figo1802@gmail.com>
Sat, 6 Jun 2009 09:16:21 +0000 (06:16 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 16 Jun 2009 22:07:53 +0000 (19:07 -0300)
vfree() does it's own NULL checking, no need for explicit check before
calling it.

Signed-off-by: Figo.zhang <figo1802@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/zr364xx.c

index ac169c9eb18d04e958ff1b6bc406f5513efbf471..fc976f42f4328d70bbccb9a65a1d4bd0b5173cf5 100644 (file)
@@ -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;
 }