]> git.proxmox.com Git - mirror_zfs.git/blobdiff - module/zfs/spa.c
Fix coverity defects: CID 147488, 147490
[mirror_zfs.git] / module / zfs / spa.c
index 0cf07be9b4cfa753fd6cfa41ba3321a9b332e3ca..ec6924a020b46e74c68abc730bc6f3f46f2771d4 100644 (file)
@@ -4947,7 +4947,7 @@ spa_vdev_detach(spa_t *spa, uint64_t guid, uint64_t pguid, int replace_done)
         * But first make sure we're not on any *other* txg's DTL list, to
         * prevent vd from being accessed after it's freed.
         */
-       vdpath = spa_strdup(vd->vdev_path);
+       vdpath = spa_strdup(vd->vdev_path ? vd->vdev_path : "none");
        for (t = 0; t < TXG_SIZE; t++)
                (void) txg_list_remove_this(&tvd->vdev_dtl_list, vd, t);
        vd->vdev_detached = B_TRUE;