summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_install
diff options
context:
space:
mode:
authorPav Lucistnik <pav@FreeBSD.org>2007-02-01 15:52:47 +0000
committerPav Lucistnik <pav@FreeBSD.org>2007-02-01 15:52:47 +0000
commit103fcbb3ba6f111f4bb55ebf03ae5200cd78a5a1 (patch)
tree025c962514685959f266024f522fc2e03f11c09d /usr.sbin/pkg_install
parent7404bf519f2ab909b484628db8f3da4ce8127766 (diff)
Notes
Diffstat (limited to 'usr.sbin/pkg_install')
-rw-r--r--usr.sbin/pkg_install/add/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/pkg_install/add/main.c b/usr.sbin/pkg_install/add/main.c
index 61caab1e448f..0750a7693d68 100644
--- a/usr.sbin/pkg_install/add/main.c
+++ b/usr.sbin/pkg_install/add/main.c
@@ -178,7 +178,7 @@ main(int argc, char **argv)
argv += optind;
if (AddMode != SLAVE) {
- pkgs = (char **)malloc(argc * sizeof(char *));
+ pkgs = (char **)malloc((argc+1) * sizeof(char *));
for (ch = 0; ch <= argc; pkgs[ch++] = NULL) ;
/* Get all the remaining package names, if any */