From a8085184d6483d9d621c0c837718630af9b776f3 Mon Sep 17 00:00:00 2001 From: Ryan Moeller Date: Tue, 28 Apr 2020 12:14:30 -0400 Subject: [PATCH] Fix zlib leak on FreeBSD 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 Reviewed-by: George Melikov Reviewed-by: Matthew Ahrens Signed-off-by: Ryan Moeller Closes #10225 Closes #10252 --- module/os/freebsd/spl/spl_zlib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/os/freebsd/spl/spl_zlib.c b/module/os/freebsd/spl/spl_zlib.c index 7549483d8..4d53f42d3 100644 --- a/module/os/freebsd/spl/spl_zlib.c +++ b/module/os/freebsd/spl/spl_zlib.c @@ -102,7 +102,7 @@ zlib_inflate(z_stream *stream, int finish) static int zlib_inflateEnd(z_stream *stream) { - return (inflateInit(stream)); + return (inflateEnd(stream)); } /*