From: ebiederm@xmission.com (Eric W. Biederman)
To: Dan Carpenter <error27@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>,
"David S. Miller" <davem@davemloft.net>,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] kobject: free memory if netlink_kernel_create() fails
Date: Tue, 25 May 2010 03:25:37 -0700 [thread overview]
Message-ID: <m1d3wk2s7y.fsf@fess.ebiederm.org> (raw)
In-Reply-To: <20100525095110.GG22515@bicker> (Dan Carpenter's message of "Tue\, 25 May 2010 11\:51\:10 +0200")
Dan Carpenter <error27@gmail.com> writes:
> There is a kfree(ue_sk) missing on the error path if
> netlink_kernel_create() fails.
>
> Signed-off-by: Dan Carpenter <error27@gmail.com>
Reviewed-by: "Eric W. Biederman" <ebiederm@xmission.com>
Oops.
> diff --git a/lib/kobject_uevent.c b/lib/kobject_uevent.c
> index 59c1551..08e15f7 100644
> --- a/lib/kobject_uevent.c
> +++ b/lib/kobject_uevent.c
> @@ -378,6 +378,7 @@ static int uevent_net_init(struct net *net)
> if (!ue_sk->sk) {
> printk(KERN_ERR
> "kobject_uevent: unable to create netlink socket!\n");
> + kfree(ue_sk);
> return -ENODEV;
> }
> mutex_lock(&uevent_sock_mutex);
next prev parent reply other threads:[~2010-05-25 10:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-25 9:51 [patch] kobject: free memory if netlink_kernel_create() fails Dan Carpenter
2010-05-25 10:25 ` Eric W. Biederman [this message]
2010-05-26 7:43 ` David Miller
2010-05-26 14:35 ` Greg KH
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=m1d3wk2s7y.fsf@fess.ebiederm.org \
--to=ebiederm@xmission.com \
--cc=davem@davemloft.net \
--cc=error27@gmail.com \
--cc=gregkh@suse.de \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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