platform: assert for success genlmsg_put() in _nl802154_alloc_msg()
This commit is contained in:
@@ -80,7 +80,8 @@ _nl802154_alloc_msg(guint16 genl_family_id, int ifindex, uint8_t cmd, uint16_t f
|
||||
nm_auto_nlmsg struct nl_msg *msg = NULL;
|
||||
|
||||
msg = nlmsg_alloc();
|
||||
genlmsg_put(msg, NL_AUTO_PORT, NL_AUTO_SEQ, genl_family_id, 0, flags, cmd, 0);
|
||||
if (!genlmsg_put(msg, NL_AUTO_PORT, NL_AUTO_SEQ, genl_family_id, 0, flags, cmd, 0))
|
||||
goto nla_put_failure;
|
||||
NLA_PUT_U32(msg, NL802154_ATTR_IFINDEX, ifindex);
|
||||
return g_steal_pointer(&msg);
|
||||
|
||||
|
Reference in New Issue
Block a user