git://git.camperquake.de
/
zfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
zfs.8: add missing info about dedup, mlslabel
[zfs.git]
/
cmd
/
ztest
/
ztest.c
diff --git
a/cmd/ztest/ztest.c
b/cmd/ztest/ztest.c
index
09f3d56
..
4479c59
100644
(file)
--- a/
cmd/ztest/ztest.c
+++ b/
cmd/ztest/ztest.c
@@
-729,13
+729,16
@@
process_options(int argc, char **argv)
UINT64_MAX >> 2);
if (strlen(altdir) > 0) {
UINT64_MAX >> 2);
if (strlen(altdir) > 0) {
- char
cmd[MAXNAMELEN]
;
- char
realaltdir[MAXNAMELEN]
;
+ char
*cmd
;
+ char
*realaltdir
;
char *bin;
char *ztest;
char *isa;
int isalen;
char *bin;
char *ztest;
char *isa;
int isalen;
+ cmd = umem_alloc(MAXPATHLEN, UMEM_NOFAIL);
+ realaltdir = umem_alloc(MAXPATHLEN, UMEM_NOFAIL);
+
VERIFY(NULL != realpath(getexecname(), cmd));
if (0 != access(altdir, F_OK)) {
ztest_dump_core = B_FALSE;
VERIFY(NULL != realpath(getexecname(), cmd));
if (0 != access(altdir, F_OK)) {
ztest_dump_core = B_FALSE;
@@
-767,6
+770,9
@@
process_options(int argc, char **argv)
fatal(B_TRUE, "invalid alternate lib directory %s",
zo->zo_alt_libpath);
}
fatal(B_TRUE, "invalid alternate lib directory %s",
zo->zo_alt_libpath);
}
+
+ umem_free(cmd, MAXPATHLEN);
+ umem_free(realaltdir, MAXPATHLEN);
}
}
}
}