HomeFreeBSD

ibcore: Fix missing ib_cm_destroy_id() in ib_cm_insert_listen()

Description

ibcore: Fix missing ib_cm_destroy_id() in ib_cm_insert_listen()

The algorithm pre-allocates a cm_id since allocation cannot be done while
holding the cm.lock spinlock, however it doesn't free it on one error
path, leading to a memory leak.

Linux commit:
c14dfddbd869bf0c2bafb7ef260c41d9cebbcfec

PR: 264248
MFC after: 1 week
Sponsored by: NVIDIA Networking

Details

Provenance
hselaskyAuthored on May 30 2022, 6:19 PM
Parents
rGf29c9901a41f: mlx4core: Fix a memory leak when deleting slave's resources
Branches
Unknown
Tags
Unknown