linux_dsm_epyc7002/drivers/infiniband
Colin Ian King 994195e153 RDMA/hns: Fix memory leak on 'context' on error return path
Currently, the error return path when the call to function
dev->dfx->query_cqc_info fails will leak object 'context'. Fix this by
making the error return path via 'err' return return codes rather than
-EMSGSIZE, set ret appropriately for all error return paths and for the
memory leak now return via 'err' rather than just returning without
freeing context.

Link: https://lore.kernel.org/r/20191024131034.19989-1-colin.king@canonical.com
Addresses-Coverity: ("Resource leak")
Fixes: e1c9a0dc29 ("RDMA/hns: Dump detailed driver-specific CQ")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
2019-10-28 13:41:23 -03:00
..
core RDMA/cm: Update copyright together with SPDX tag 2019-10-28 10:15:11 -03:00
hw RDMA/hns: Fix memory leak on 'context' on error return path 2019-10-28 13:41:23 -03:00
sw RDMA/rxe: Remove useless rxe_init_device_param assignments 2019-10-24 15:20:18 -03:00
ulp RDMA/srpt: Fix TPG creation 2019-10-28 13:30:00 -03:00
Kconfig
Makefile