mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-25 02:09:42 +00:00
IB/qib: Fix memory leak in qib_user_sdma_queue_pkts()
[ Upstream commitbee90911e0
] The wrong goto label was used for the error case and missed cleanup of the pkt allocation. Fixes:d39bf40e55
("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> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
78874bca4f
commit
79dcbd8176
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue