Browse Source

qcacmn: Add null pointer validation in init_deinit_alloc_num_units()

Make sure mem_reqs is not null in init_deinit_alloc_num_units().

Change-Id: Id93616fa8b4bfda8216b34e15169fa1636efa5f3
CRs-Fixed: 2347695
Arif Hussain 6 years ago
parent
commit
ee8d84061c
1 changed files with 3 additions and 2 deletions
  1. 3 2
      target_if/init_deinit/src/init_cmd_api.c

+ 3 - 2
target_if/init_deinit/src/init_cmd_api.c

@@ -205,8 +205,9 @@ static QDF_STATUS init_deinit_alloc_num_units(struct wlan_objmgr_psoc *psoc,
 	uint32_t num_units;
 	QDF_STATUS status;
 
-	if (!tgt_hdl) {
-		target_if_err("target_psoc_info is null");
+	if (!tgt_hdl || !mem_reqs) {
+		target_if_err("Invalid parameters, tgt_hdl: %pK, mem_reqs: %pK",
+			      tgt_hdl, mem_reqs);
 		return QDF_STATUS_E_INVAL;
 	}