Sfoglia il codice sorgente

qcacmn: Check for successful memory allocation for peer

Check if memory is allocated successfully for the peer
before adding the peer to the deleted peer table.

Change-Id: Iea623075f85787039d67733dc8071e0c093073ed
CRs-Fixed: 2160767
Varun Reddy Yeturu 7 anni fa
parent
commit
d6b2247ece
1 ha cambiato i file con 5 aggiunte e 0 eliminazioni
  1. 5 0
      umac/cmn_services/obj_mgr/src/wlan_objmgr_psoc_obj.c

+ 5 - 0
umac/cmn_services/obj_mgr/src/wlan_objmgr_psoc_obj.c

@@ -1235,6 +1235,11 @@ static qdf_list_t
 					peer_list =
 					qdf_mem_malloc(
 					sizeof(struct wlan_logically_del_peer));
+					if (peer_list == NULL) {
+						/* Lock is already released */
+						obj_mgr_err("Mem alloc failed");
+						break;
+					}
 
 					peer_list->peer = peer;