Skip to content

Commit cd084c6

Browse files
authored
Merge pull request FRRouting#19965 from donaldsharp/coverity_netlink
zebra: Check return code to make coverity happy
2 parents 49408d2 + 6bcc5b5 commit cd084c6

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

zebra/rt_netlink.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2460,8 +2460,8 @@ static int netlink_neigh_update(int cmd, int ifindex, void *addr, char *lla,
24602460
if (!nl_attr_put(&req.n, sizeof(req), NDA_DST, addr, family2addrsize(family)))
24612461
return -1;
24622462

2463-
if (lla)
2464-
nl_attr_put(&req.n, sizeof(req), NDA_LLADDR, lla, llalen);
2463+
if (lla && !nl_attr_put(&req.n, sizeof(req), NDA_LLADDR, lla, llalen))
2464+
return -1;
24652465

24662466
if (IS_ZEBRA_DEBUG_KERNEL) {
24672467
char ip_str[INET6_ADDRSTRLEN + 8];

0 commit comments

Comments
 (0)