]> git.baikalelectronics.ru Git - kernel.git/commit
IB/qib: Fix memory leak in qib_user_sdma_queue_pkts()
authorJosé Expósito <jose.exposito89@gmail.com>
Wed, 8 Dec 2021 17:52:38 +0000 (18:52 +0100)
committerJason Gunthorpe <jgg@nvidia.com>
Wed, 15 Dec 2021 00:05:13 +0000 (20:05 -0400)
commit673e4dd8dbad9cc5110c7bb7d61840c2cd66451f
treeef205b460764a79d24cf114fb04d16f5bc8271b4
parent4db047769ad102b826468ff774fd9bd01ebdb77b
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: cf7cf57b5f46 ("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>
drivers/infiniband/hw/qib/qib_user_sdma.c