summaryrefslogtreecommitdiffstats
path: root/freebsd/sbin/nvmecontrol/comnd.c
diff options
context:
space:
mode:
Diffstat (limited to 'freebsd/sbin/nvmecontrol/comnd.c')
-rw-r--r--freebsd/sbin/nvmecontrol/comnd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/freebsd/sbin/nvmecontrol/comnd.c b/freebsd/sbin/nvmecontrol/comnd.c
index a4fa686f..06af943d 100644
--- a/freebsd/sbin/nvmecontrol/comnd.c
+++ b/freebsd/sbin/nvmecontrol/comnd.c
@@ -207,7 +207,7 @@ arg_parse(int argc, char * const * argv, const struct cmd *f)
if (lopts == NULL)
err(1, "option memory");
#ifndef __rtems__
- p = shortopts = malloc((2 * n + 2) * sizeof(char));
+ p = shortopts = malloc((n + 3) * sizeof(char));
#else /* __rtems__ */
p = shortopts = malloc((2 * n + 3) * sizeof(char));
#endif /* __rtems__ */