提交 743db2d9 编写于 作者: D Dan Carpenter 提交者: Greg Kroah-Hartman

kobject: free memory if netlink_kernel_create() fails

There is a kfree(ue_sk) missing on the error path if
netlink_kernel_create() fails.
Signed-off-by: NDan Carpenter <error27@gmail.com>
Reviewed-by: N"Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 c8421286
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册