]> iEval git - io-compress-brotli.git/commitdiff
Fix leak of encoded_buffer on bro() spotted by mattia
authorQuim Rovira <joaquim.rovira@booking.com>
Mon, 15 Aug 2016 15:51:16 +0000 (17:51 +0200)
committerQuim Rovira <joaquim.rovira@booking.com>
Mon, 15 Aug 2016 15:51:40 +0000 (17:51 +0200)
Brotli.xs

index 89167f21d4739fe2156254b4030aec5af522ad1d..c4660198661c43425f6498c351733c26e82b4875 100644 (file)
--- 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;
This page took 0.027532 seconds and 4 git commands to generate.