aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorcao <[email protected]>2016-10-13 02:16:47 +0800
committerBrian Behlendorf <[email protected]>2016-10-12 11:16:47 -0700
commit06cf4d989058a65f72b140d85e2c21effd3b3834 (patch)
tree0720a7c874084e577e2aad3baa8767c198ec9f60 /tests
parentaf4db70f368d0e9c9ad90f0837a77e511a77b0a7 (diff)
Fix coverity defects: CID 147606, 147609
coverity scan CID:147606, Type:resource leak coverity scan CID:147609, Type:resource leak Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: cao.xuewen <[email protected]> Closes #5245
Diffstat (limited to 'tests')
-rw-r--r--tests/zfs-tests/cmd/dir_rd_update/dir_rd_update.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/zfs-tests/cmd/dir_rd_update/dir_rd_update.c b/tests/zfs-tests/cmd/dir_rd_update/dir_rd_update.c
index 3e075e3d7..64348549d 100644
--- a/tests/zfs-tests/cmd/dir_rd_update/dir_rd_update.c
+++ b/tests/zfs-tests/cmd/dir_rd_update/dir_rd_update.c
@@ -108,6 +108,7 @@ main(int argc, char **argv)
}
j++;
}
+ (void) close(fd);
} else if (pid == 0) {
int fd = open(dirpath, O_RDONLY);
int chownret;
@@ -128,6 +129,7 @@ main(int argc, char **argv)
k++;
}
+ (void) close(fd);
}
return (0);