Fix potential NULL pointer dereference in zfsdle_vdev_online()
Coverity complained about this. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Chunwei Chen <david.chen@nutanix.com> Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu> Closes #13903
This commit is contained in:
parent
c6d93d0a80
commit
1ff8f41851
|
@ -964,7 +964,7 @@ zfsdle_vdev_online(zpool_handle_t *zhp, void *data)
|
||||||
nvlist_t *tgt;
|
nvlist_t *tgt;
|
||||||
int error;
|
int error;
|
||||||
|
|
||||||
char *tmp_devname, devname[MAXPATHLEN];
|
char *tmp_devname, devname[MAXPATHLEN] = "";
|
||||||
uint64_t guid;
|
uint64_t guid;
|
||||||
|
|
||||||
if (nvlist_lookup_uint64(udev_nvl, ZFS_EV_VDEV_GUID, &guid) == 0) {
|
if (nvlist_lookup_uint64(udev_nvl, ZFS_EV_VDEV_GUID, &guid) == 0) {
|
||||||
|
|
Loading…
Reference in New Issue