mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-24 18:39:34 +03:00
Fix coverity defects: CID 147511, 147513
CID 147511: Type:Dereference before null check CID 147513: Type:Dereference before null check Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: cao.xuewen <cao.xuewen@zte.com.cn> Closes #5306
This commit is contained in:
parent
13d9a004fe
commit
aed0e9f3e4
@ -3290,7 +3290,7 @@ zdb_vdev_lookup(vdev_t *vdev, char *path)
|
||||
return (NULL);
|
||||
|
||||
vdev = vdev->vdev_child[i];
|
||||
if (*s == '\0')
|
||||
if (s && *s == '\0')
|
||||
return (vdev);
|
||||
return (zdb_vdev_lookup(vdev, s+1));
|
||||
|
||||
|
@ -532,8 +532,10 @@ nfs_is_share_active(sa_share_impl_t impl_share)
|
||||
|
||||
nfs_exportfs_temp_fp = fdopen(fd, "r");
|
||||
|
||||
if (nfs_exportfs_temp_fp == NULL ||
|
||||
fseek(nfs_exportfs_temp_fp, 0, SEEK_SET) < 0) {
|
||||
if (nfs_exportfs_temp_fp == NULL)
|
||||
return (B_FALSE);
|
||||
|
||||
if (fseek(nfs_exportfs_temp_fp, 0, SEEK_SET) < 0) {
|
||||
fclose(nfs_exportfs_temp_fp);
|
||||
return (B_FALSE);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user