summaryrefslogtreecommitdiffstats
path: root/ripngd
diff options
context:
space:
mode:
authorF. Aragon <paco@voltanet.io>2018-07-03 15:39:50 +0200
committerF. Aragon <paco@voltanet.io>2018-07-03 15:39:50 +0200
commitb575a12c878f5fc0c346204215f648e112f026e0 (patch)
treeb1de3abe015787064db4ea809ef21aa0b81b9249 /ripngd
parentMerge pull request #2475 from LabNConsulting/working/master/no_vrf_socket_4l3... (diff)
downloadfrr-b575a12c878f5fc0c346204215f648e112f026e0.tar.xz
frr-b575a12c878f5fc0c346204215f648e112f026e0.zip
bgpd lib ospfd pimd ripngd: null chk (PVS-Studio)
Signed-off-by: F. Aragon <paco@voltanet.io>
Diffstat (limited to 'ripngd')
-rw-r--r--ripngd/ripngd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ripngd/ripngd.c b/ripngd/ripngd.c
index 840157516..565e151c5 100644
--- a/ripngd/ripngd.c
+++ b/ripngd/ripngd.c
@@ -1516,9 +1516,10 @@ int ripng_write_rte(int num, struct stream *s, struct prefix_ipv6 *p,
}
/* Write routing table entry. */
- if (!nexthop)
+ if (!nexthop) {
+ assert(p);
stream_write(s, (uint8_t *)&p->prefix, sizeof(struct in6_addr));
- else
+ } else
stream_write(s, (uint8_t *)nexthop, sizeof(struct in6_addr));
stream_putw(s, tag);
if (p)