From: Quim Rovira Date: Mon, 15 Aug 2016 15:51:16 +0000 (+0200) Subject: Fix leak of encoded_buffer on bro() spotted by mattia X-Git-Tag: 0.002~19 X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;ds=sidebyside;h=aaed23cfe7fa81d408dea0653bee3cbc908919b2;p=io-compress-brotli.git Fix leak of encoded_buffer on bro() spotted by mattia --- diff --git a/Brotli.xs b/Brotli.xs index 89167f2..c466019 100644 --- a/Brotli.xs +++ b/Brotli.xs @@ -118,6 +118,7 @@ SV* bro(buffer, quality=BROTLI_DEFAULT_QUALITY, lgwin=BROTLI_DEFAULT_WINDOW) &encoded_size, encoded_buffer ); if(!result){ + Safefree(buffer); croak("Error in BrotliEncoderCompress"); } encoded_buffer[encoded_size]=0;