[PATCH v2] RDMA: release allocated skb

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In create_cq, the allocated skb buffer needs to be released on error
path.
Moved the kfree_skb(skb) under err4 label.

Signed-off-by: Navid Emamdoost <navid.emamdoost@xxxxxxxxx>
---
 drivers/infiniband/hw/cxgb4/cq.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/infiniband/hw/cxgb4/cq.c b/drivers/infiniband/hw/cxgb4/cq.c
index b1bb61c65f4f..1886c1af10bc 100644
--- a/drivers/infiniband/hw/cxgb4/cq.c
+++ b/drivers/infiniband/hw/cxgb4/cq.c
@@ -173,6 +173,7 @@ static int create_cq(struct c4iw_rdev *rdev, struct t4_cq *cq,
 err4:
 	dma_free_coherent(&rdev->lldi.pdev->dev, cq->memsize, cq->queue,
 			  dma_unmap_addr(cq, mapping));
+	kfree_skb(skb);
 err3:
 	kfree(cq->sw_queue);
 err2:
-- 
2.17.1




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux