소스 검색

qcacmn: Validate qdf_nbuf_clone return before calling mgmt rx cb

For more than one registered mgmt rx callbacks, we clone the
mgmt rx buf and call each rx handler. We need to check the return
type of qdf_nbuf_clone before we call the regsitered handlers.

Change-Id: Ic8513fc51954fb88c80ae6822e0fa45e34bcf12c
CRs-Fixed: 2322631
Vivek 6 년 전
부모
커밋
068d14f8e1
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      umac/cmn_services/mgmt_txrx/dispatcher/src/wlan_mgmt_txrx_tgt_api.c

+ 4 - 0
umac/cmn_services/mgmt_txrx/dispatcher/src/wlan_mgmt_txrx_tgt_api.c

@@ -986,6 +986,10 @@ QDF_STATUS tgt_mgmt_txrx_rx_frame_handler(
 	rx_handler = rx_handler_head;
 	while (rx_handler->next) {
 		copy_buf = qdf_nbuf_clone(buf);
+
+		if (!copy_buf)
+			continue;
+
 		rx_handler->rx_cb(psoc, peer, copy_buf,
 					mgmt_rx_params, frm_type);
 		rx_handler = rx_handler->next;