From c6ae1163ac5b975510aad910b2693c58accdac96 Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 5 Aug 2011 00:00:15 +0000 Subject: [Bug 3386197]: Fix buffer direction botch. Damn you, confusing terminology! --- ChangeLog | 3 ++- generic/tclZlib.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 61825c0..9d2b16d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,8 @@ 2011-08-05 Donal K. Fellows * generic/tclZlib.c (ZlibTransformClose): [Bug 3386197]: Plug a memory - leak found by Miguel with valgrind. + leak found by Miguel with valgrind, and ensure that the correct + direction's buffers are released. 2011-08-04 Miguel Sofer diff --git a/generic/tclZlib.c b/generic/tclZlib.c index 80431a3..922ec18 100644 --- a/generic/tclZlib.c +++ b/generic/tclZlib.c @@ -2295,9 +2295,9 @@ ZlibTransformClose( } } } while (e != Z_STREAM_END); - e = deflateEnd(&cd->inStream); + e = deflateEnd(&cd->outStream); } else { - e = inflateEnd(&cd->outStream); + e = inflateEnd(&cd->inStream); } /* -- cgit v0.12