aboutsummaryrefslogtreecommitdiffstats
path: root/tests/zfs-tests/cmd/file/largest_file.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/zfs-tests/cmd/file/largest_file.c')
-rw-r--r--tests/zfs-tests/cmd/file/largest_file.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/zfs-tests/cmd/file/largest_file.c b/tests/zfs-tests/cmd/file/largest_file.c
index 8545bb7ee..d7252556b 100644
--- a/tests/zfs-tests/cmd/file/largest_file.c
+++ b/tests/zfs-tests/cmd/file/largest_file.c
@@ -78,6 +78,8 @@ main(int argc, char **argv)
return (errno);
testfile = strdup(argv[1]);
+ if (testfile == NULL)
+ return (errno);
fd = open(testfile, O_CREAT | O_RDWR, mode);
if (fd < 0) {