> Subject: [PATCH] IB/qib: Fix memory leak in qib_user_sdma_queue_pkts > > Addresses-Coverity-ID: 1493352 ("Resource leak") > Signed-off-by: José Expósito <jose.exposito89@xxxxxxxxx> > --- > 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; > > -- Thanks for catching my mistake! Mike Acked-by: Mike Marciniszyn <mike.marciniszyn@xxxxxxxxxxxxxxxxxxxx> Fixes d39bf40e55e6 ("IB/qib: Protect from buffer overflow in struct qib_user_sdma_pkt fields"):