Przeglądaj źródła

qcacmn: Fix nbuf leak in tx datapath

Free nbuf_clone before returning from dp_tx_mlo_mcast_multipass_send.
Since this API is allocating nbuf_clone, it has the responsibility
of freeing it.

Change-Id: I7a1334a1d941ec352533e788a65596a1b12ae08a
CRs-Fixed: 3628989
Varsha Mishra 1 rok temu
rodzic
commit
a4a989e5b7
1 zmienionych plików z 4 dodań i 2 usunięć
  1. 4 2
      dp/wifi3.0/be/dp_be_tx.c

+ 4 - 2
dp/wifi3.0/be/dp_be_tx.c

@@ -632,7 +632,7 @@ dp_tx_mlo_mcast_multipass_send(struct dp_vdev_be *be_vdev,
 	} else {
 		/* return when vlan map is not initialized */
 		if (!ptnr_vdev->iv_vlan_map)
-			return;
+			goto nbuf_free;
 		group_key = ptnr_vdev->iv_vlan_map[ptr->vlan_id];
 
 		/*
@@ -640,7 +640,7 @@ dp_tx_mlo_mcast_multipass_send(struct dp_vdev_be *be_vdev,
 		 */
 
 		if (!group_key)
-			return;
+			goto nbuf_free;
 
 		dp_tx_remove_vlan_tag(ptnr_vdev, nbuf_clone);
 		dp_tx_add_groupkey_metadata(ptnr_vdev, &msdu_info, group_key);
@@ -653,6 +653,8 @@ dp_tx_mlo_mcast_multipass_send(struct dp_vdev_be *be_vdev,
 					&msdu_info,
 					DP_MLO_MCAST_REINJECT_PEER_ID,
 					NULL);
+
+nbuf_free:
 	if (qdf_unlikely(nbuf_clone)) {
 		dp_info("pkt send failed");
 		qdf_nbuf_free(nbuf_clone);