Jelajahi Sumber

qcacld-3.0: Avoid use of uninitialized variables

In set featureset info function, there is a possibility that host driver
may use uninitialized variables which may lead to unexpected behavior.
To address this issue, initialize the uninitialized variables.

Change-Id: Iaf2fdcf511ceca609c154d2a6e3f412d4f40d0bb
CRs-Fixed: 3434878
Ashish Kumar Dhanotiya 2 tahun lalu
induk
melakukan
f3fedee966
1 mengubah file dengan 3 tambahan dan 3 penghapusan
  1. 3 3
      core/wma/src/wma_main.c

+ 3 - 3
core/wma/src/wma_main.c

@@ -356,9 +356,9 @@ static void wma_set_feature_set_info(tp_wma_handle wma_handle,
 	struct cds_context *cds_ctx =
 		(struct cds_context *)(wma_handle->cds_context);
 	struct wlan_objmgr_psoc *psoc;
-	struct wlan_scan_features scan_feature_set;
-	struct wlan_twt_features twt_feature_set;
-	struct wlan_mlme_features mlme_feature_set;
+	struct wlan_scan_features scan_feature_set = {0};
+	struct wlan_twt_features twt_feature_set = {0};
+	struct wlan_mlme_features mlme_feature_set = {0};
 	struct wlan_tdls_features tdls_feature_set = {0};
 
 	psoc = wma_handle->psoc;