From: Mauro Carvalho Chehab <mchehab@redhat.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: torvalds@linux-foundation.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] dereferencing freed in saa5246a.c
Date: Wed, 6 May 2009 17:30:48 -0300 [thread overview]
Message-ID: <20090506173048.0ad84f85@pedra.chehab.org> (raw)
In-Reply-To: <20090506161317.24311.48890.stgit@t61.ukuu.org.uk>
Em Wed, 06 May 2009 17:13:33 +0100
Alan Cox <alan@lxorguk.ukuu.org.uk> escreveu:
> From: Dan Carpenter <error27@gmail.com>
>
> I lowered the kfree(t) down a couple lines and removed the superflous
> "t->vdev = NULL;"
>
> regards,
> dan carpenter
>
> Signed-off-by: Dan Carpenter <error27@gmail.com>
> Signed-off-by: Alan Cox <alan@linux.intel.com>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
> ---
>
> drivers/media/video/saa5246a.c | 3 +--
> 1 files changed, 1 insertions(+), 2 deletions(-)
>
>
> diff --git a/drivers/media/video/saa5246a.c b/drivers/media/video/saa5246a.c
> index da47b2f..155804b 100644
> --- a/drivers/media/video/saa5246a.c
> +++ b/drivers/media/video/saa5246a.c
> @@ -1092,9 +1092,8 @@ static int saa5246a_probe(struct i2c_client *client,
> /* Register it */
> err = video_register_device(t->vdev, VFL_TYPE_VTX, -1);
> if (err < 0) {
> - kfree(t);
> video_device_release(t->vdev);
> - t->vdev = NULL;
> + kfree(t);
> return err;
> }
> return 0;
>
--
Cheers,
Mauro
next prev parent reply other threads:[~2009-05-06 20:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-06 16:12 [PATCH 0/2] Fix some free dereferences Alan Cox
2009-05-06 16:13 ` [PATCH 1/2] dereferencing freed in saa5246a.c Alan Cox
2009-05-06 20:30 ` Mauro Carvalho Chehab [this message]
2009-05-06 16:13 ` [PATCH 2/2] dereferencing freed in saa5249.c Alan Cox
2009-05-06 20:31 ` Mauro Carvalho Chehab
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=20090506173048.0ad84f85@pedra.chehab.org \
--to=mchehab@redhat.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/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
all inboxes | Powered by JetHome®