mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-23 19:04:45 +03:00
Fix coverity defects: CID 147488, 147490
CID 147488, Type:explicit null dereferenced CID 147490, Type:dereference null return value Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: cao.xuewen <cao.xuewen@zte.com.cn> Closes #5237
This commit is contained in:
+1
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user