nl80211: Fix conditional checks of nlmsg attributes for NAN publish

Some of the cleanup changes had lost the "goto fail" and broken the
logic. Restore correct behavior.

Fixes: 58f04221fd ("nl80211: NAN USD commands for offloading")
Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
This commit is contained in:
Shivani Baranwal 2024-09-07 19:15:42 +05:30 committed by Jouni Malinen
parent 204ebcce3e
commit 9edd8b441e

View file

@ -13682,6 +13682,7 @@ static int nl80211_nan_publish(void *priv, const u8 *src, int publish_id,
params->freq) ||
add_freq_list(msg, QCA_WLAN_VENDOR_ATTR_USD_CHAN_CONFIG_FREQ_LIST,
params->freq_list))
goto fail;
nla_nest_end(msg, attr);
nla_nest_end(msg, container);