Skip to content

Commit bee9091

Browse files
JoseExpositojgunthorpe
authored andcommitted
IB/qib: Fix memory leak in qib_user_sdma_queue_pkts()
The wrong goto label was used for the error case and missed cleanup of the pkt allocation. Fixes: d39bf40 ("IB/qib: Protect from buffer overflow in struct qib_user_sdma_pkt fields") Link: https://lore.kernel.org/r/20211208175238.29983-1-jose.exposito89@gmail.com Addresses-Coverity-ID: 1493352 ("Resource leak") Signed-off-by: José Expósito <jose.exposito89@gmail.com> Acked-by: Mike Marciniszyn <mike.marciniszyn@cornelisnetworks.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
1 parent 4ad8181 commit bee9091

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/infiniband/hw/qib/qib_user_sdma.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -941,7 +941,7 @@ static int qib_user_sdma_queue_pkts(const struct qib_devdata *dd,
941941
&addrlimit) ||
942942
addrlimit > type_max(typeof(pkt->addrlimit))) {
943943
ret = -EINVAL;
944-
goto free_pbc;
944+
goto free_pkt;
945945
}
946946
pkt->addrlimit = addrlimit;
947947

0 commit comments

Comments
 (0)