summaryrefslogtreecommitdiffstats
path: root/sys/netinet6/nd6.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netinet6/nd6.c')
-rw-r--r--sys/netinet6/nd6.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c
index 2c4cc53..4265b31 100644
--- a/sys/netinet6/nd6.c
+++ b/sys/netinet6/nd6.c
@@ -2065,6 +2065,12 @@ nd6_storelladdr(ifp, rt0, m, dst, desten)
}
}
+ if (rt0 == NULL) {
+ /* this could happen, if we could not allocate memory */
+ m_freem(m);
+ return (ENOMEM);
+ }
+
error = rt_check(&rt, &rt0, dst);
if (error) {
m_freem(m);
OpenPOWER on IntegriCloud