netlink: fix NULL check in the default route snl(3) parser.
CID: 1506959 MFC after: 2 weeks
This commit is contained in:
parent
27cbc1a7fe
commit
4aeb939ecf
@ -82,6 +82,8 @@ nlattr_get_multipath(struct snl_state *ss, struct nlattr *nla, const void *arg _
|
||||
size_t sz = (max_nhops + 2) * sizeof(struct rta_mpath_nh);
|
||||
|
||||
struct rta_mpath *mp = snl_allocz(ss, sz);
|
||||
if (mp == NULL)
|
||||
return (false);
|
||||
mp->num_nhops = 0;
|
||||
|
||||
for (rtnh = (struct rtnexthop *)(void *)(nla + 1); data_len > 0; ) {
|
||||
|
Loading…
Reference in New Issue
Block a user