From a095ab684ceb5c3942c719353d7d2d9c4c8bc35c Mon Sep 17 00:00:00 2001 From: James Turner Date: Wed, 21 Apr 2021 21:53:56 +0100 Subject: [PATCH] ASan: fix a leak in GZ extraction --- simgear/io/untar.cxx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/simgear/io/untar.cxx b/simgear/io/untar.cxx index f73bbfa3..c11686ed 100644 --- a/simgear/io/untar.cxx +++ b/simgear/io/untar.cxx @@ -348,6 +348,9 @@ public: ~GZTarExtractor() { + if (haveInitedZLib) { + inflateEnd(&zlibStream); + } free(zlibOutput); }