mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-25 03:37:45 +03:00
Fix coverity defects: CID 147610, 147608, 147607
coverity scan CID:147610, Type: Resource leak. coverity scan CID:147608, Type: Resource leak. coverity scan CID:147607, Type: Resource leak. Reviewed-by: Richard Laager <rlaager@wiktel.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: cao.xuewen <cao.xuewen@zte.com.cn> Closes #5143
This commit is contained in:
+3
-2
@@ -6700,9 +6700,10 @@ zfs_do_diff(int argc, char **argv)
|
||||
if ((atp = strchr(copy, '@')))
|
||||
*atp = '\0';
|
||||
|
||||
if ((zhp = zfs_open(g_zfs, copy, ZFS_TYPE_FILESYSTEM)) == NULL)
|
||||
if ((zhp = zfs_open(g_zfs, copy, ZFS_TYPE_FILESYSTEM)) == NULL) {
|
||||
free(copy);
|
||||
return (1);
|
||||
|
||||
}
|
||||
free(copy);
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user