From d7920fd10a726fbba13b776c0c125c69986a6e40 Mon Sep 17 00:00:00 2001 From: Ryan Moeller Date: Sat, 25 Apr 2020 03:48:58 -0400 Subject: [PATCH] Fix zlib leak on FreeBSD Fixes #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 --- 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 7549483d8bc5..4d53f42d3f44 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)); } /*