Skip to content

Commit

Permalink
Remove incorrect free() in zfs_get_pci_slots_sys_path()
Browse files Browse the repository at this point in the history
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 <richard.yao@alumni.stonybrook.edu>
  • Loading branch information
ryao committed Sep 13, 2022
1 parent ede037c commit bc6037a
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion lib/libzutil/os/linux/zutil_device_path_os.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit bc6037a

Please sign in to comment.