diff options
-rw-r--r-- | usr.sbin/ndp/ndp.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/ndp/ndp.c b/usr.sbin/ndp/ndp.c index d14dd41c67a..230ba3eb4dd 100644 --- a/usr.sbin/ndp/ndp.c +++ b/usr.sbin/ndp/ndp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ndp.c,v 1.67 2015/10/28 12:14:25 florian Exp $ */ +/* $OpenBSD: ndp.c,v 1.68 2016/01/12 09:47:13 mpi Exp $ */ /* $KAME: ndp.c,v 1.101 2002/07/17 08:46:33 itojun Exp $ */ /* @@ -1055,6 +1055,8 @@ plist(void) err(1, "sysctl(ICMPV6CTL_ND6_PRLIST)"); /*NOTREACHED*/ } + if (l == 0) + return; buf = malloc(l); if (buf == NULL) { err(1, "malloc"); |