mirror of
https://github.com/joel16/android_kernel_sony_msm8994_rework.git
synced 2024-12-30 08:14:57 +00:00
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: Dan Carpenter <error27@gmail.com> Reviewed-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
c842128607
commit
743db2d903
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user