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:
Родитель
c842128607
Коммит
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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче