qcacld-3.0: Fix g23_prevent issues for hdd

Currently in hdd_get_curr_thermal_stats_val,
hdd_get_station_info_ex skb is not getting
freed, this might cause memory leakage.

To address this issue free skb each time for
nla failure

Change-Id: If481cf0ea6cbdce55b3f02c3ce99f577deaac9c7
CRs-Fixed: 3297781
This commit is contained in:
Divyajyothi Goparaju
2022-09-20 18:29:09 +05:30
committed by Madan Koyyalamudi
parent 757995b317
commit 1520bd7a4e
2 changed files with 6 additions and 2 deletions

View File

@@ -2389,6 +2389,7 @@ static int hdd_get_station_info_ex(struct hdd_context *hdd_ctx,
if (connect_fail_rsn_len) {
if (hdd_add_connect_fail_reason_code(skb, adapter)) {
hdd_err_rl("hdd_add_connect_fail_reason_code fail");
kfree_skb(skb);
return -ENOMEM;
}
}

View File

@@ -400,7 +400,7 @@ hdd_get_curr_thermal_stats_val(struct wiphy *wiphy,
if (!therm_attr) {
hdd_err_rl("nla_nest_start failed for attr failed");
ret = -EINVAL;
goto completed;
goto nla_failed;
}
for (i = 0; i < get_tt_stats->therm_throt_levels; i++) {
@@ -409,7 +409,7 @@ hdd_get_curr_thermal_stats_val(struct wiphy *wiphy,
hdd_err_rl("nla_nest_start failed for thermal level %d",
i);
ret = -EINVAL;
goto completed;
goto nla_failed;
}
hdd_debug("level %d, Temp Range: %d - %d, Dwell time %d, Counter %d",
@@ -436,7 +436,10 @@ hdd_get_curr_thermal_stats_val(struct wiphy *wiphy,
}
nla_nest_end(skb, therm_attr);
wlan_cfg80211_vendor_cmd_reply(skb);
goto completed;
nla_failed:
kfree_skb(skb);
completed:
hdd_ctx->is_therm_stats_in_progress = false;
osif_request_put(request);