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:
Richard Yao 2022-09-13 20:00:53 -04:00 committed by Tony Hutter
parent b247d47be1
commit 3f380df778
1 changed files with 0 additions and 1 deletions

View File

@ -265,7 +265,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;