Skip to contentSkip to conversation

RDMA: release allocated skb

PATCH Superseded Navid Emamdoost 1 participant 1 message Sep 18, 2019

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 RDMA: release allocated skb

In create_cq, the allocated skb buffer needs to be released on error path.

---
 drivers/infiniband/hw/cxgb4/cq.c | 1 +
 1 file changed, 1 insertion(+)
drivers/infiniband/hw/cxgb4/cq.c +1 -0
index b1bb61c65f4f..841a395d9896 100644
@@ -166,6 +166,7 @@ static int create_cq(struct c4iw_rdev *rdev, struct t4_cq *cq,
 	if (user && !cq->bar2_pa) {
 		pr_warn("%s: cqid %u not in BAR2 range\n",
 			pci_name(rdev->lldi.pdev), cq->cqid);
+		kfree_skb(skb);
 		ret = -EINVAL;
 		goto err4;
 	}
Signature · 1 line
2.17.1