mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-23 10:54:35 +03:00
Fix coverity defects: CID 147548
CID 147548: Type:Dereference null return value Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: cao.xuewen <cao.xuewen@zte.com.cn> Closes #5321
This commit is contained in:
@@ -863,12 +863,13 @@ libzfs_init(void)
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
hdl->libzfs_sharetab = fopen("/etc/dfs/sharetab", "r");
|
||||
hdl->libzfs_sharetab = fopen(ZFS_SHARETAB, "r");
|
||||
|
||||
if (libzfs_core_init() != 0) {
|
||||
(void) close(hdl->libzfs_fd);
|
||||
(void) fclose(hdl->libzfs_mnttab);
|
||||
(void) fclose(hdl->libzfs_sharetab);
|
||||
if (hdl->libzfs_sharetab)
|
||||
(void) fclose(hdl->libzfs_sharetab);
|
||||
free(hdl);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user