diff options
author | Colin Ian King <[email protected]> | 2019-10-24 14:10:34 +0100 |
---|---|---|
committer | Jason Gunthorpe <[email protected]> | 2019-10-28 13:41:23 -0300 |
commit | 994195e1537074f56df216a9309f6e366cb35b67 (patch) | |
tree | b0575c3c09178339f825a46d180ed20eda1d4467 /tools/perf/scripts/python/stat-cpi.py | |
parent | 887803db866a7a4e1817a3cb8a3eee4e9879fed2 (diff) |
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/[email protected]
Addresses-Coverity: ("Resource leak")
Fixes: e1c9a0dc2939 ("RDMA/hns: Dump detailed driver-specific CQ")
Signed-off-by: Colin Ian King <[email protected]>
Reviewed-by: Jason Gunthorpe <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/stat-cpi.py')
0 files changed, 0 insertions, 0 deletions