mirror of
				https://git.proxmox.com/git/mirror_zfs.git
				synced 2025-10-26 18:05:04 +03:00 
			
		
		
		
	set_global_var() should not pass NULL pointers to dlclose()
Both Coverity and Clang's static analyzer caught this. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu> Closes #14044
This commit is contained in:
		
							parent
							
								
									1bd02680c0
								
							
						
					
					
						commit
						c6b161e390
					
				| @ -229,13 +229,14 @@ set_global_var(char const *arg) | |||||||
| 		fprintf(stderr, "Failed to open libzpool.so to set global " | 		fprintf(stderr, "Failed to open libzpool.so to set global " | ||||||
| 		    "variable\n"); | 		    "variable\n"); | ||||||
| 		ret = EIO; | 		ret = EIO; | ||||||
| 		goto out_dlclose; | 		goto out_free; | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	ret = 0; | 	ret = 0; | ||||||
| 
 | 
 | ||||||
| out_dlclose: | out_dlclose: | ||||||
| 	dlclose(zpoolhdl); | 	dlclose(zpoolhdl); | ||||||
|  | out_free: | ||||||
| 	free(varname); | 	free(varname); | ||||||
| out_ret: | out_ret: | ||||||
| 	return (ret); | 	return (ret); | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Richard Yao
						Richard Yao