aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/arp/arp.c
diff options
context:
space:
mode:
authorGleb Smirnoff <glebius@FreeBSD.org>2013-09-23 18:12:25 +0000
committerGleb Smirnoff <glebius@FreeBSD.org>2013-09-23 18:12:25 +0000
commit876fc15d472e97728df5dfc85a678c41fe2cefa6 (patch)
tree748e440b0427a303361271f1f62782634e32ec62 /usr.sbin/arp/arp.c
parent98e2cd036d057e6fa9a3da49157a39a7c557047e (diff)
downloadsrc-876fc15d472e97728df5dfc85a678c41fe2cefa6.tar.gz
src-876fc15d472e97728df5dfc85a678c41fe2cefa6.zip
Fix coredump on 'arp -d'.
Submitted by: az Approved by: re (kib)
Notes
Notes: svn path=/head/; revision=255821
Diffstat (limited to 'usr.sbin/arp/arp.c')
-rw-r--r--usr.sbin/arp/arp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/arp/arp.c b/usr.sbin/arp/arp.c
index 8bdd555aebd3..25fbb23b36fc 100644
--- a/usr.sbin/arp/arp.c
+++ b/usr.sbin/arp/arp.c
@@ -187,8 +187,11 @@ main(int argc, char *argv[])
if (argc != 0)
usage();
search(0, nuke_entry);
- } else
+ } else {
+ if (argc != 1)
+ usage();
rtn = delete(argv[0]);
+ }
break;
case F_FILESET:
if (argc != 1)