genl_ctrl_probe_by_name: fix checking of genlmsg_put() return value
It's a pointer! not an error code :) nasty bugs
This commit is contained in:
parent
00261259f0
commit
49c94c3490
1 changed files with 2 additions and 2 deletions
|
@ -255,8 +255,8 @@ static struct genl_family *genl_ctrl_probe_by_name(struct nl_sock *sk,
|
|||
if (!(cb = nl_cb_clone(nl_socket_get_cb(sk))))
|
||||
goto out_msg_free;
|
||||
|
||||
if (genlmsg_put(msg, NL_AUTO_PORT, NL_AUTO_SEQ, GENL_ID_CTRL,
|
||||
0, 0, CTRL_CMD_GETFAMILY, 1) < 0) {
|
||||
if (!genlmsg_put(msg, NL_AUTO_PORT, NL_AUTO_SEQ, GENL_ID_CTRL,
|
||||
0, 0, CTRL_CMD_GETFAMILY, 1)) {
|
||||
BUG();
|
||||
goto out_cb_free;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue