[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1275684449-20061-2-git-send-email-gregkh@suse.de>
Date: Fri, 4 Jun 2010 13:47:28 -0700
From: Greg Kroah-Hartman <gregkh@...e.de>
To: linux-kernel@...r.kernel.org
Cc: Dan Carpenter <error27@...il.com>,
Greg Kroah-Hartman <gregkh@...e.de>
Subject: [PATCH 2/3] kobject: free memory if netlink_kernel_create() fails
From: Dan Carpenter <error27@...il.com>
There is a kfree(ue_sk) missing on the error path if
netlink_kernel_create() fails.
Signed-off-by: Dan Carpenter <error27@...il.com>
Reviewed-by: "Eric W. Biederman" <ebiederm@...ssion.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@...e.de>
---
lib/kobject_uevent.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/lib/kobject_uevent.c b/lib/kobject_uevent.c
index e2eb989..b935795 100644
--- a/lib/kobject_uevent.c
+++ b/lib/kobject_uevent.c
@@ -380,6 +380,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);
--
1.7.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists