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
cf66e7e594
commit
fcd7293d4e
@ -273,7 +273,6 @@ zfs_get_pci_slots_sys_path(const char *dev_name)
|
||||
free(address2);
|
||||
if (asprintf(&path, "/sys/bus/pci/slots/%s",
|
||||
ep->d_name) == -1) {
|
||||
free(tmp);
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user