From de6c0d3d8cb279e0dd6a4831d85a9c45047908ba Mon Sep 17 00:00:00 2001 From: Richard Yao Date: Tue, 20 Sep 2022 18:20:04 -0400 Subject: [PATCH] Fix potential NULL pointer dereference in zfsdle_vdev_online() Coverity complained about this. Reviewed-by: Brian Behlendorf Reviewed-by: Chunwei Chen Signed-off-by: Richard Yao Closes #13903 --- cmd/zed/agents/zfs_mod.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/zed/agents/zfs_mod.c b/cmd/zed/agents/zfs_mod.c index af6de73a1..53d9ababd 100644 --- a/cmd/zed/agents/zfs_mod.c +++ b/cmd/zed/agents/zfs_mod.c @@ -965,7 +965,7 @@ zfsdle_vdev_online(zpool_handle_t *zhp, void *data) nvlist_t *tgt; int error; - char *tmp_devname, devname[MAXPATHLEN]; + char *tmp_devname, devname[MAXPATHLEN] = ""; uint64_t guid; if (nvlist_lookup_uint64(udev_nvl, ZFS_EV_VDEV_GUID, &guid) == 0) {