Forráskód Böngészése

qcacld-3.0: Prevent memory leak in wlan_hdd_cfg80211_ocb_set_config

Currently, Host performs validation of NLA attribute
QCA_WLAN_VENDOR_ATTR_OCB_SET_CONFIG_CHANNEL_ARRAY twice
which leads to memory leak.

As a part of fix, Check for SET_CONFIG_CHANNEL_ARRAY
only once and free memory in error scenario.

Change-Id: I5c90c937682417b8181fda7d499908b9425d4c6a
CRs-Fixed: 2103954
Mukul Sharma 7 éve
szülő
commit
81d9f334e5
1 módosított fájl, 0 hozzáadás és 4 törlés
  1. 0 4
      core/hdd/src/wlan_hdd_ocb.c

+ 0 - 4
core/hdd/src/wlan_hdd_ocb.c

@@ -858,10 +858,6 @@ static int __wlan_hdd_cfg80211_ocb_set_config(struct wiphy *wiphy,
 	config->flags = flags;
 
 	/* Read the channel array */
-	if (!tb[QCA_WLAN_VENDOR_ATTR_OCB_SET_CONFIG_CHANNEL_ARRAY]) {
-		hdd_err("CHANNEL_ARRAY is not present");
-		return -EINVAL;
-	}
 	channel_array = tb[QCA_WLAN_VENDOR_ATTR_OCB_SET_CONFIG_CHANNEL_ARRAY];
 	if (!channel_array) {
 		hdd_err("No channel present");