mirror of
				https://git.proxmox.com/git/mirror_zfs.git
				synced 2025-10-26 18:05:04 +03:00 
			
		
		
		
	libzfs: mount: don't leak mnt_param_t if mnt_func fails
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #12968
This commit is contained in:
		
							parent
							
								
									271241187b
								
							
						
					
					
						commit
						56eed508d4
					
				| @ -1348,7 +1348,7 @@ zfs_mount_task(void *arg) | |||||||
| 	    sizeof (mountpoint), NULL, NULL, 0, B_FALSE) == 0); | 	    sizeof (mountpoint), NULL, NULL, 0, B_FALSE) == 0); | ||||||
| 
 | 
 | ||||||
| 	if (mp->mnt_func(handles[idx], mp->mnt_data) != 0) | 	if (mp->mnt_func(handles[idx], mp->mnt_data) != 0) | ||||||
| 		return; | 		goto out; | ||||||
| 
 | 
 | ||||||
| 	/*
 | 	/*
 | ||||||
| 	 * We dispatch tasks to mount filesystems with mountpoints underneath | 	 * We dispatch tasks to mount filesystems with mountpoints underneath | ||||||
| @ -1369,6 +1369,8 @@ zfs_mount_task(void *arg) | |||||||
| 		zfs_dispatch_mount(mp->mnt_hdl, handles, num_handles, i, | 		zfs_dispatch_mount(mp->mnt_hdl, handles, num_handles, i, | ||||||
| 		    mp->mnt_func, mp->mnt_data, mp->mnt_tp); | 		    mp->mnt_func, mp->mnt_data, mp->mnt_tp); | ||||||
| 	} | 	} | ||||||
|  | 
 | ||||||
|  | out: | ||||||
| 	free(mp); | 	free(mp); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 наб
						наб