Explorar el Código

qcacld-3.0: Add NULL check for 'session' pointer

Check if 'session' pointer is NULL before accessing it.

Change-Id: I3bbcbe9b67ff7fa0e057fa27ad9fcf0a7098d862
CRs-Fixed: 3324998
Prasanna JS hace 2 años
padre
commit
60977caea8
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. 3 0
      core/mac/src/pe/lim/lim_utils.h

+ 3 - 0
core/mac/src/pe/lim/lim_utils.h

@@ -1768,6 +1768,9 @@ lim_update_he_6ghz_band_caps(struct mac_context *mac,
 #ifdef WLAN_FEATURE_11BE
 static inline bool lim_is_session_eht_capable(struct pe_session *session)
 {
+	if (!session)
+		return false;
+
 	return session->eht_capable;
 }