summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRichard Yao <[email protected]>2022-09-13 20:00:53 -0400
committerTony Hutter <[email protected]>2022-12-01 12:39:40 -0800
commit3f380df778c67bf6919df088ed9635323a6b6ffb (patch)
tree043dd6a1eb86cb9dcb0baecb56682fb463e26e9e /lib
parentb247d47be1834b3dcd006128d52592acbcb0f010 (diff)
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 <[email protected]> Reviewed-by: Tony Hutter <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Richard Yao <[email protected]> Closes #13864
Diffstat (limited to 'lib')
-rw-r--r--lib/libzutil/os/linux/zutil_device_path_os.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/lib/libzutil/os/linux/zutil_device_path_os.c b/lib/libzutil/os/linux/zutil_device_path_os.c
index 45a6f6f59..e443899bf 100644
--- a/lib/libzutil/os/linux/zutil_device_path_os.c
+++ b/lib/libzutil/os/linux/zutil_device_path_os.c
@@ -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;