HomeFreeBSD

ibcore: Fix possible memory leak in ib_mad_post_receive_mads()

Description

ibcore: Fix possible memory leak in ib_mad_post_receive_mads()

If ib_dma_mapping_error() returns non-zero value,
ib_mad_post_receive_mads() will jump out of loops and return -ENOMEM
without freeing mad_priv. Fix this memory-leak problem by freeing
mad_priv in this case.

Linux commit:
a17f4bed811c60712d8131883cdba11a105d0161

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

Details

Provenance
hselaskyAuthored on May 19 2022, 8:06 AM
Parents
rG716fd348e01c: zfs: merge openzfs/zfs@c0cf6ed67
Branches
Unknown
Tags
Unknown