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 <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
This commit is contained in:
Ryan Moeller 2020-04-28 12:14:30 -04:00 committed by GitHub
parent 47c9299fcc
commit a8085184d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View 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));
}
/*