qcacld-3.0: Do not cache connection info for non sta interface
Currently driver does not check the mode of the current interface whether it is STA of CLI and it caches the connection info, in this process it allocates the memory to cache he operation, this memory get freed only for station type adapter because of which there is a possibility of memleak for CLI interface. To avoid above issue, add a change to only cache the information STA interface. Change-Id: Ic68d71dfd9887600fe1a287de66d735c2c802491 CRs-Fixed: 3028583
This commit is contained in:

committed by
Madan Koyyalamudi

parent
3f732b46d9
commit
7f9901450a
@@ -601,14 +601,21 @@ static void hdd_cm_save_bss_info(struct hdd_adapter *adapter,
|
||||
hdd_sta_ctx->conn_info.conn_flag.vht_op_present = false;
|
||||
}
|
||||
|
||||
/* Cleanup already existing he info */
|
||||
hdd_cleanup_conn_info(adapter);
|
||||
/*
|
||||
* Cache connection info only in case of station
|
||||
*/
|
||||
if (adapter->device_mode == QDF_STA_MODE) {
|
||||
/* Cleanup already existing he info */
|
||||
hdd_cleanup_conn_info(adapter);
|
||||
|
||||
/* Cache last connection info */
|
||||
qdf_mem_copy(&hdd_sta_ctx->cache_conn_info, &hdd_sta_ctx->conn_info,
|
||||
sizeof(hdd_sta_ctx->cache_conn_info));
|
||||
/* Cache last connection info */
|
||||
qdf_mem_copy(&hdd_sta_ctx->cache_conn_info,
|
||||
&hdd_sta_ctx->conn_info,
|
||||
sizeof(hdd_sta_ctx->cache_conn_info));
|
||||
|
||||
hdd_copy_he_operation(hdd_sta_ctx, &assoc_resp->he_op);
|
||||
}
|
||||
|
||||
hdd_copy_he_operation(hdd_sta_ctx, &assoc_resp->he_op);
|
||||
qdf_mem_free(assoc_resp);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user