HomeFreeBSD

Fix abd_get_offset_struct() may allocate new abd

Description

Fix abd_get_offset_struct() may allocate new abd

Even when supplied with an abd to abd_get_offset_struct(), the call
to abd_get_offset_impl() can allocate a different abd. Ensure to
call abd_fini_struct() on the abd that is not used.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Jorgen Lundman <lundman@lundman.net>
Closes #11683

Details

Provenance
Jorgen Lundman <lundman@lundman.net>Authored on Mar 5 2021, 8:22 PM
GitHub <noreply@github.com>Committed on Mar 5 2021, 8:22 PM
Parents
rGba74de88c089: FreeBSD module --enable-debug --enable-invariants
Branches
Unknown
Tags
Unknown

Event Timeline

GitHub <noreply@github.com> committed rG8a6d44482573: Fix abd_get_offset_struct() may allocate new abd (authored by Jorgen Lundman <lundman@lundman.net>).Mar 5 2021, 8:22 PM