Browse Source

qcacmn: Free memory for stats event to os_if in timeout

In case os_if request times out, free the corresponding
memory allocated for stats event to os_if.

Change-Id: I23bd65f2b79c71070d65b5e4045eaf4e17113354
CRs-Fixed: 2262653
Naveen Rawat 6 years ago
parent
commit
2e7637575d
1 changed files with 2 additions and 0 deletions
  1. 2 0
      os_if/linux/cp_stats/src/wlan_cfg80211_mc_cp_stats.c

+ 2 - 0
os_if/linux/cp_stats/src/wlan_cfg80211_mc_cp_stats.c

@@ -285,6 +285,7 @@ static void get_peer_rssi_cb(struct stats_event *ev, void *cookie)
 	request = osif_request_get(cookie);
 	if (!request) {
 		cfg80211_err("Obsolete request");
+		ucfg_mc_cp_stats_free_stats_resources(ev);
 		return;
 	}
 
@@ -367,6 +368,7 @@ static void get_station_stats_cb(struct stats_event *station_info, void *cookie)
 	request = osif_request_get(cookie);
 	if (!request) {
 		cfg80211_err("Obsolete request");
+		ucfg_mc_cp_stats_free_stats_resources(station_info);
 		return;
 	}
 	priv = osif_request_priv(request);