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
Sponsored by: NVIDIA Networking

(cherry picked from commit c4a415505311e30093b6d9ee0493427a66f2b0de)

Details

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