HomeFreeBSD

Fix memory leaks in dmu_send()/dmu_send_obj()

Description

Fix memory leaks in dmu_send()/dmu_send_obj()

If we encounter an EXDEV error when using the redacted snapshots
feature, the memory used by dspp.fromredactsnaps is leaked.

Clang's static analyzer caught this during an experiment in which I had
annotated various headers in an attempt to improve the results of static
analysis.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Closes #13973

Details

Provenance
Richard Yao <richard.yao@alumni.stonybrook.edu>Authored on Oct 18 2022, 11:03 PM
GitHub <noreply@github.com>Committed on Oct 18 2022, 11:03 PM
Parents
rG84243acb91b7: Cleanup: Remove NULL pointer check from dmu_send_impl()
Branches
Unknown
Tags
Unknown

Event Timeline

GitHub <noreply@github.com> committed rGeaaed26ffb3a: Fix memory leaks in dmu_send()/dmu_send_obj() (authored by Richard Yao <richard.yao@alumni.stonybrook.edu>).Oct 18 2022, 11:03 PM