瀏覽代碼

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;