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:

committed by
Madan Koyyalamudi

parent
757995b317
commit
1520bd7a4e
@@ -2389,6 +2389,7 @@ static int hdd_get_station_info_ex(struct hdd_context *hdd_ctx,
|
|||||||
if (connect_fail_rsn_len) {
|
if (connect_fail_rsn_len) {
|
||||||
if (hdd_add_connect_fail_reason_code(skb, adapter)) {
|
if (hdd_add_connect_fail_reason_code(skb, adapter)) {
|
||||||
hdd_err_rl("hdd_add_connect_fail_reason_code fail");
|
hdd_err_rl("hdd_add_connect_fail_reason_code fail");
|
||||||
|
kfree_skb(skb);
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -400,7 +400,7 @@ hdd_get_curr_thermal_stats_val(struct wiphy *wiphy,
|
|||||||
if (!therm_attr) {
|
if (!therm_attr) {
|
||||||
hdd_err_rl("nla_nest_start failed for attr failed");
|
hdd_err_rl("nla_nest_start failed for attr failed");
|
||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
goto completed;
|
goto nla_failed;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < get_tt_stats->therm_throt_levels; i++) {
|
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",
|
hdd_err_rl("nla_nest_start failed for thermal level %d",
|
||||||
i);
|
i);
|
||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
goto completed;
|
goto nla_failed;
|
||||||
}
|
}
|
||||||
|
|
||||||
hdd_debug("level %d, Temp Range: %d - %d, Dwell time %d, Counter %d",
|
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);
|
nla_nest_end(skb, therm_attr);
|
||||||
wlan_cfg80211_vendor_cmd_reply(skb);
|
wlan_cfg80211_vendor_cmd_reply(skb);
|
||||||
|
goto completed;
|
||||||
|
|
||||||
|
nla_failed:
|
||||||
|
kfree_skb(skb);
|
||||||
completed:
|
completed:
|
||||||
hdd_ctx->is_therm_stats_in_progress = false;
|
hdd_ctx->is_therm_stats_in_progress = false;
|
||||||
osif_request_put(request);
|
osif_request_put(request);
|
||||||
|
Reference in New Issue
Block a user