From: Greg Kroah-Hartman on
From: Dan Carpenter <error27(a)>

There is a kfree(ue_sk) missing on the error path if
netlink_kernel_create() fails.

Signed-off-by: Dan Carpenter <error27(a)>
Reviewed-by: "Eric W. Biederman" <ebiederm(a)>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)>
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) {
"kobject_uevent: unable to create netlink socket!\n");
+ kfree(ue_sk);
return -ENODEV;

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)
More majordomo info at
Please read the FAQ at