Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix memory leak in ztest #14583

Merged
merged 1 commit into from
Mar 6, 2023
Merged

Fix memory leak in ztest #14583

merged 1 commit into from
Mar 6, 2023

Conversation

ryao
Copy link
Contributor

@ryao ryao commented Mar 6, 2023

Motivation and Context

This is tripping LeakSanitizer, which causes zloop test failures on pull requests.

https://github.com/openzfs/zfs/actions/runs/4339196990
https://github.com/openzfs/zfs/actions/runs/4328310768

Description

Add a missing umem_free() to an error path in ztest_dmu_object_alloc_free() and zero the pointer to it. Inspection of the code reveals that nothing uses the zd->zd_od pointer after calling ztest_dmu_object_alloc_free(), so this should be fine.

How Has This Been Tested?

The buildbot can test it.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Library ABI change (libzfs, libzfs_core, libnvpair, libuutil and libzfsbootenv)
  • Documentation (a change to man pages or other documentation)

Checklist:

This is tripping LeakSanitizer, which causes zloop test failures on pull
requests.

Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
return;
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice find

@ryao
Copy link
Contributor Author

ryao commented Mar 6, 2023

The Fedora buildbot failure is #14584.

@behlendorf behlendorf added the Status: Accepted Ready to integrate (reviewed, tested) label Mar 6, 2023
@behlendorf behlendorf merged commit bc4d210 into openzfs:master Mar 6, 2023
mcmilk pushed a commit to mcmilk/zfs that referenced this pull request Mar 13, 2023
This is tripping LeakSanitizer, which causes zloop test failures on pull
requests.

Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Closes openzfs#14583
lundman pushed a commit to openzfsonwindows/openzfs that referenced this pull request Mar 16, 2023
This is tripping LeakSanitizer, which causes zloop test failures on pull
requests.

Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Closes openzfs#14583
datacore-rm pushed a commit to DataCoreSoftware/openzfs that referenced this pull request Aug 14, 2023
This is tripping LeakSanitizer, which causes zloop test failures on pull
requests.

Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Closes openzfs#14583
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Accepted Ready to integrate (reviewed, tested)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants