Browse Source

qcacld-3.0: Add NULL pointer check

Check for NULL pointer when accessing STA node from Hash Table
struct sDphHashNode.

Change-Id: Icec382526f0397c3ccb048120967aee0a8285d7e
CRs-Fixed: 3337661
Rachit Kankane 2 years ago
parent
commit
f1b89355e0
1 changed files with 2 additions and 2 deletions
  1. 2 2
      core/mac/src/pe/lim/lim_assoc_utils.c

+ 2 - 2
core/mac/src/pe/lim/lim_assoc_utils.c

@@ -3347,8 +3347,8 @@ lim_check_and_announce_join_success(struct mac_context *mac_ctx,
 					&aid,
 					&session_entry->dph.dphHashTable);
 
-	if (QDF_IS_STATUS_SUCCESS(lim_update_srp_ie(beacon_probe_rsp,
-						    sta_ds))) {
+	if (sta_ds && QDF_IS_STATUS_SUCCESS(lim_update_srp_ie(beacon_probe_rsp,
+							      sta_ds))) {
 		/* update the SR parameters */
 		lim_update_vdev_sr_elements(session_entry, sta_ds);
 		/* TODO: Need to send SRP IE update event to userspace */