mirror of
				https://git.proxmox.com/git/mirror_zfs.git
				synced 2025-10-26 18:05:04 +03:00 
			
		
		
		
	Fix memory leaks in pool properties handling
Reviewed-by: Alexander Motin <mav@FreeBSD.org> Signed-off-by: Richard Kojedzinszky <richard@kojedz.in> Closes #17208
This commit is contained in:
		
							parent
							
								
									a486cac359
								
							
						
					
					
						commit
						5952fc15b9
					
				| @ -85,6 +85,7 @@ zpool_get_all_props(zpool_handle_t *zhp) | ||||
| 		fnvlist_add_string_array(innvl, ZPOOL_GET_PROPS_NAMES, | ||||
| 		    zhp->zpool_propnames, zhp->zpool_n_propnames); | ||||
| 		zcmd_write_src_nvlist(hdl, &zc, innvl); | ||||
| 		fnvlist_free(innvl); | ||||
| 	} | ||||
| 
 | ||||
| 	zcmd_alloc_dst_nvlist(hdl, &zc, 0); | ||||
| @ -332,7 +333,7 @@ zpool_get_prop(zpool_handle_t *zhp, zpool_prop_t prop, char *buf, | ||||
| 	 */ | ||||
| 	if (prop == ZPOOL_PROP_DEDUPCACHED) { | ||||
| 		zpool_add_propname(zhp, ZPOOL_DEDUPCACHED_PROP_NAME); | ||||
| 		(void) zpool_get_all_props(zhp); | ||||
| 		(void) zpool_props_refresh(zhp); | ||||
| 	} | ||||
| 
 | ||||
| 	if (zhp->zpool_props == NULL && zpool_get_all_props(zhp) && | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Richard Kojedzinszky
						Richard Kojedzinszky