qcacld-3.0: Fix memory leak in dfs module
Fix memory leak in dfs module by removing check for the board id.
During dfs_attach dfs_hw_bd_id was zero, so memory was allocated for
pulses_ext_seg but in wma registration process correct board was
updated. In dfs_detach while freeing the memory we check for the
board id and we leaked the memory for pulses_ext_seg.
Change-Id: Ica9719cc4cd67e895fad850c59c753d39473f46d
CRs-Fixed: 974299
diff --git a/core/sap/dfs/src/dfs.c b/core/sap/dfs/src/dfs.c
index 85266dc..4d7fbbc 100644
--- a/core/sap/dfs/src/dfs.c
+++ b/core/sap/dfs/src/dfs.c
@@ -489,8 +489,7 @@
dfs->pulses = NULL;
}
- if (dfs->pulses_ext_seg != NULL &&
- ic->dfs_hw_bd_id != DFS_HWBD_QCA6174) {
+ if (dfs->pulses_ext_seg != NULL) {
OS_FREE(dfs->pulses_ext_seg);
dfs->pulses_ext_seg = NULL;
}
@@ -520,8 +519,7 @@
OS_FREE(dfs->dfs_b5radars);
dfs->dfs_b5radars = NULL;
}
- if (dfs->dfs_b5radars_ext_seg != NULL &&
- ic->dfs_hw_bd_id != DFS_HWBD_QCA6174) {
+ if (dfs->dfs_b5radars_ext_seg != NULL) {
OS_FREE(dfs->dfs_b5radars_ext_seg);
dfs->dfs_b5radars_ext_seg = NULL;
}