]> git.proxmox.com Git - mirror_zfs.git/commitdiff
Fix zlib leak on FreeBSD
authorRyan Moeller <ryan@iXsystems.com>
Tue, 28 Apr 2020 16:14:30 +0000 (12:14 -0400)
committerGitHub <noreply@github.com>
Tue, 28 Apr 2020 16:14:30 +0000 (09:14 -0700)
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 #10225
Closes #10252

module/os/freebsd/spl/spl_zlib.c

index 7549483d8bc58b5de4188aeb624c58245fc8b50d..4d53f42d3f44573ac2313fec141bec4fded5a568 100644 (file)
@@ -102,7 +102,7 @@ zlib_inflate(z_stream *stream, int finish)
 static int
 zlib_inflateEnd(z_stream *stream)
 {
-       return (inflateInit(stream));
+       return (inflateEnd(stream));
 }
 
 /*