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 zlib leak on FreeBSD #10252

Merged
merged 1 commit into from
Apr 28, 2020
Merged

Conversation

ghost
Copy link

@ghost ghost commented Apr 25, 2020

Motivation and Context

Fixes #10225

zlib_inflateEnd was accidentally a wrapper for inflateInit instead of
inflateEnd, and hilarity ensues.

Description

Fix the typo so we free memory instead of allocating more.

How Has This Been Tested?

I made sure it builds.

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)
  • Documentation (a change to man pages or other documentation)

Checklist:

  • My code follows the ZFS on Linux code style requirements.
  • I have updated the documentation accordingly.
  • I have read the contributing document.
  • I have added tests to cover my changes.
  • I have run the ZFS Test Suite with this change applied.
  • All commit messages are properly formatted and contain Signed-off-by.

Fixes openzfs#10225

zlib_inflateEnd was accidentally a wrapper for inflateInit instead of
inflateEnd, and hilarity ensues.

Fix the typo so we free memory instead of allocating more.

Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
@ghost ghost added the Status: Code Review Needed Ready for review and testing label Apr 25, 2020
@ghost ghost requested a review from ahrens April 25, 2020 08:01
@codecov-io
Copy link

codecov-io commented Apr 25, 2020

Codecov Report

Merging #10252 into master will increase coverage by 0.13%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #10252      +/-   ##
==========================================
+ Coverage   79.28%   79.42%   +0.13%     
==========================================
  Files         389      389              
  Lines      123046   123046              
==========================================
+ Hits        97559    97724     +165     
+ Misses      25487    25322     -165     
Flag Coverage Δ
#kernel 79.88% <ø> (-0.02%) ⬇️
#user 66.13% <ø> (+1.24%) ⬆️
Impacted Files Coverage Δ
module/os/linux/spl/spl-zlib.c 55.35% <0.00%> (-28.58%) ⬇️
module/zcommon/zfs_fletcher.c 75.65% <0.00%> (-2.64%) ⬇️
module/zfs/zil.c 91.33% <0.00%> (-2.03%) ⬇️
cmd/zed/agents/fmd_api.c 88.61% <0.00%> (-1.78%) ⬇️
module/zfs/zrlock.c 89.23% <0.00%> (-1.54%) ⬇️
cmd/zed/agents/zfs_diagnosis.c 77.55% <0.00%> (-1.17%) ⬇️
module/zfs/spa_log_spacemap.c 93.40% <0.00%> (-1.15%) ⬇️
cmd/zed/agents/fmd_serd.c 78.21% <0.00%> (-1.00%) ⬇️
module/zfs/dmu_traverse.c 96.01% <0.00%> (-0.67%) ⬇️
lib/libzutil/os/linux/zutil_import_os.c 78.07% <0.00%> (-0.67%) ⬇️
... and 59 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 47c9299...d7920fd. Read the comment docs.

@behlendorf behlendorf merged commit a808518 into openzfs:master Apr 28, 2020
@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels Apr 28, 2020
@ghost ghost deleted the openzfs-10225 branch April 28, 2020 16:35
jsai20 pushed a commit to jsai20/zfs that referenced this pull request Mar 30, 2021
zlib_inflateEnd was accidentally a wrapper for inflateInit instead of
inflateEnd, and hilarity ensues.

Fix the typo so we free memory instead of allocating more.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Closes openzfs#10225
Closes openzfs#10252
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.

compression=gzip on FreeBSD leaks memory
5 participants