diff options
author | F. Aragon <paco@voltanet.io> | 2018-07-03 15:39:50 +0200 |
---|---|---|
committer | F. Aragon <paco@voltanet.io> | 2018-07-03 15:39:50 +0200 |
commit | b575a12c878f5fc0c346204215f648e112f026e0 (patch) | |
tree | b1de3abe015787064db4ea809ef21aa0b81b9249 /ripngd | |
parent | Merge pull request #2475 from LabNConsulting/working/master/no_vrf_socket_4l3... (diff) | |
download | frr-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.c | 5 |
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) |