diff options
author | Jianglei Nie <[email protected]> | 2022-07-11 15:07:18 +0800 |
---|---|---|
committer | Leon Romanovsky <[email protected]> | 2022-07-19 08:21:29 +0300 |
commit | aa2a1df3a2c85f855af7d54466ac10bd48645d63 (patch) | |
tree | d863fec02e827c485a56776ff88ce9119276c2c3 /scripts/gdb/linux/proc.py | |
parent | 03905ac2852c577c9d863ed92fa6cc8ffabb2c7b (diff) |
RDMA/hfi1: fix potential memory leak in setup_base_ctxt()
setup_base_ctxt() allocates a memory chunk for uctxt->groups with
hfi1_alloc_ctxt_rcv_groups(). When init_user_ctxt() fails, uctxt->groups
is not released, which will lead to a memory leak.
We should release the uctxt->groups with hfi1_free_ctxt_rcv_groups()
when init_user_ctxt() fails.
Fixes: e87473bc1b6c ("IB/hfi1: Only set fd pointer when base context is completely initialized")
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jianglei Nie <[email protected]>
Acked-by: Dennis Dalessandro <[email protected]>
Signed-off-by: Leon Romanovsky <[email protected]>
Diffstat (limited to 'scripts/gdb/linux/proc.py')
0 files changed, 0 insertions, 0 deletions