Quellcode durchsuchen

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 vor 6 Jahren
Ursprung
Commit
068d14f8e1

+ 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;