mirror of
				https://git.proxmox.com/git/mirror_zfs.git
				synced 2025-10-26 18:05:04 +03:00 
			
		
		
		
	Remove incorrect free() in zfs_get_pci_slots_sys_path()
Coverity found this. We attempted to free tmp, which is a pointer to a string that should be freed by the caller. Reviewed-by: Neal Gompa <ngompa@datto.com> Reviewed-by: Tony Hutter <hutter2@llnl.gov> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu> Closes #13864
This commit is contained in:
		
							parent
							
								
									b247d47be1
								
							
						
					
					
						commit
						3f380df778
					
				| @ -265,7 +265,6 @@ zfs_get_pci_slots_sys_path(const char *dev_name) | |||||||
| 			free(address2); | 			free(address2); | ||||||
| 			if (asprintf(&path, "/sys/bus/pci/slots/%s", | 			if (asprintf(&path, "/sys/bus/pci/slots/%s", | ||||||
| 			    ep->d_name) == -1) { | 			    ep->d_name) == -1) { | ||||||
| 				free(tmp); |  | ||||||
| 				continue; | 				continue; | ||||||
| 			} | 			} | ||||||
| 			break; | 			break; | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Richard Yao
						Richard Yao