From a0bb4d6ec1e7029b0a417b647b0fc012fc78afa0 Mon Sep 17 00:00:00 2001 From: Varun Reddy Yeturu Date: Mon, 10 Jun 2019 07:00:54 -0700 Subject: [PATCH] qcacmn: Free the Rx descriptor pool in error case Free the Rx descriptors pool if there is a failure in allocating memory for nbuf during dp_pdev_rx_buffers_attach() Change-Id: If4fcfcfdc2fe70c8c4753518ca020a7d8b0bd2b5 CRs-Fixed: 2464596 --- dp/wifi3.0/dp_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dp/wifi3.0/dp_main.c b/dp/wifi3.0/dp_main.c index f474bfd29e7a..752dfc73e389 100644 --- a/dp/wifi3.0/dp_main.c +++ b/dp/wifi3.0/dp_main.c @@ -3442,7 +3442,7 @@ static struct cdp_pdev *dp_pdev_attach_wifi3(struct cdp_soc_t *txrx_soc, if (dp_rx_pdev_attach(pdev)) { QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_ERROR, FL("dp_rx_pdev_attach failed")); - goto fail1; + goto fail2; } DP_STATS_INIT(pdev); @@ -3465,7 +3465,7 @@ static struct cdp_pdev *dp_pdev_attach_wifi3(struct cdp_soc_t *txrx_soc, if (dp_rx_pdev_mon_attach(pdev)) { QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_ERROR, "dp_rx_pdev_mon_attach failed"); - goto rx_mon_attach_fail; + goto fail2; } if (dp_wdi_event_attach(pdev)) { @@ -3515,7 +3515,7 @@ wdi_attach_fail: */ dp_rx_pdev_mon_detach(pdev); -rx_mon_attach_fail: +fail2: dp_rx_pdev_detach(pdev); fail1: