linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] IB/qib: Fix memory leak in qib_user_sdma_queue_pkts
@ 2021-12-08 17:52 José Expósito
  2021-12-08 18:07 ` Marciniszyn, Mike
  2021-12-15  0:07 ` Jason Gunthorpe
  0 siblings, 2 replies; 3+ messages in thread
From: José Expósito @ 2021-12-08 17:52 UTC (permalink / raw)
  To: dennis.dalessandro
  Cc: mike.marciniszyn, dledford, jgg, linux-rdma, linux-kernel,
	José Expósito

Addresses-Coverity-ID: 1493352 ("Resource leak")
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
---
 drivers/infiniband/hw/qib/qib_user_sdma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/infiniband/hw/qib/qib_user_sdma.c b/drivers/infiniband/hw/qib/qib_user_sdma.c
index ac11943a5ddb..bf2f30d67949 100644
--- a/drivers/infiniband/hw/qib/qib_user_sdma.c
+++ b/drivers/infiniband/hw/qib/qib_user_sdma.c
@@ -941,7 +941,7 @@ static int qib_user_sdma_queue_pkts(const struct qib_devdata *dd,
 					       &addrlimit) ||
 			    addrlimit > type_max(typeof(pkt->addrlimit))) {
 				ret = -EINVAL;
-				goto free_pbc;
+				goto free_pkt;
 			}
 			pkt->addrlimit = addrlimit;
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-12-15  0:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-08 17:52 [PATCH] IB/qib: Fix memory leak in qib_user_sdma_queue_pkts José Expósito
2021-12-08 18:07 ` Marciniszyn, Mike
2021-12-15  0:07 ` Jason Gunthorpe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).