From: "Figo.zhang" <figo1802@gmail.com>
To: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>
Subject: Re: [PATCH] zr364xx.c: vfree does its own NULL check
Date: Tue, 16 Jun 2009 00:02:48 +0800 [thread overview]
Message-ID: <1245081768.3337.0.camel@myhost> (raw)
In-Reply-To: <1244279782.3185.9.camel@myhost>
hi Mauro,
is it ok for this patch?
Best Regards,
Figo.zhang
On Sat, 2009-06-06 at 17:16 +0800, Figo.zhang wrote:
> vfree() does it's own NULL checking, no need for explicit check before
> calling it.
>
> Signed-off-by: Figo.zhang <figo1802@gmail.com>
> ---
> drivers/media/video/zr364xx.c | 6 ++++--
> 1 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/media/video/zr364xx.c b/drivers/media/video/zr364xx.c
> index ac169c9..fc976f4 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;
> }
>
>
>
>
>
>
>
>
prev parent reply other threads:[~2009-06-15 16:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-06 9:16 [PATCH] zr364xx.c: vfree does its own NULL check Figo.zhang
2009-06-15 16:02 ` Figo.zhang [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1245081768.3337.0.camel@myhost \
--to=figo1802@gmail.com \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox