From bc6037a0ddc20f9ec5d0970084d994eb455ff247 Mon Sep 17 00:00:00 2001 From: Richard Yao Date: Fri, 9 Sep 2022 17:58:48 -0400 Subject: [PATCH] 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. Signed-off-by: Richard Yao --- lib/libzutil/os/linux/zutil_device_path_os.c | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/libzutil/os/linux/zutil_device_path_os.c b/lib/libzutil/os/linux/zutil_device_path_os.c index f081ef53da79..9f4c74f50f3c 100644 --- a/lib/libzutil/os/linux/zutil_device_path_os.c +++ b/lib/libzutil/os/linux/zutil_device_path_os.c @@ -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;