From: Shivani Baranwal Date: Sat, 7 Sep 2024 13:45:42 +0000 (+0530) Subject: nl80211: Fix conditional checks of nlmsg attributes for NAN publish X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9edd8b441e8a2a14c98ed30745aa75d5a872aab7;p=thirdparty%2Fhostap.git 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: 58f04221fdef ("nl80211: NAN USD commands for offloading") Signed-off-by: Shivani Baranwal --- diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index c8ca9f251..5c2a721d1 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -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);