WSL2-Linux-Kernel/drivers/infiniband
Miaoqian Lin 889000874c RDMA/cm: Fix memory leak in ib_cm_insert_listen
commit 2990f223ff upstream.

cm_alloc_id_priv() allocates resource for the cm_id_priv. When
cm_init_listen() fails it doesn't free it, leading to memory leak.

Add the missing error unwind.

Fixes: 98f67156a8 ("RDMA/cm: Simplify establishing a listen cm_id")
Link: https://lore.kernel.org/r/20220621052546.4821-1-linmq006@gmail.com
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-07-07 17:53:26 +02:00
..
core RDMA/cm: Fix memory leak in ib_cm_insert_listen 2022-07-07 17:53:26 +02:00
hw RDMA/qedr: Fix reporting QP timeout attribute 2022-07-07 17:53:26 +02:00
sw RDMA/rxe: Generate a completion for unsupported/invalid opcode 2022-06-09 10:23:31 +02:00
ulp RDMA/ib_srp: Fix a deadlock 2022-03-02 11:48:02 +01:00
Kconfig
Makefile