mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02: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
					
				
					 1 changed files with 1 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -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 a new issue