nl80211: Check that attribute addition succeeds in offloaded PASN case

Check nla_put_flag() return value to be consistent with other nla_put*()
uses.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
This commit is contained in:
Jouni Malinen 2022-11-07 12:27:25 +02:00 committed by Jouni Malinen
parent 0658a22ef1
commit 3e1a04afa1

View file

@ -12267,9 +12267,10 @@ static int nl80211_send_pasn_resp(void *priv, struct pasn_auth *params)
ETH_ALEN, params->peer[i].peer_addr))
goto fail;
if (params->peer[i].status == 0)
nla_put_flag(msg,
QCA_WLAN_VENDOR_ATTR_PASN_PEER_STATUS_SUCCESS);
if (params->peer[i].status == 0 &&
nla_put_flag(msg,
QCA_WLAN_VENDOR_ATTR_PASN_PEER_STATUS_SUCCESS))
goto fail;
wpa_printf(MSG_DEBUG,
"nl80211: Own address[%u]: " MACSTR