shithub: jbig2

Download patch

ref: 394e3b05973edea07196710e10caa1af5c840a56
parent: 94050e73b85c64633e3bab2447b03a0d1c24c481
author: Sebastian Rasmussen <[email protected]>
date: Fri Jun 14 10:51:01 EDT 2019

jbig2dec: Fix leak of huffman decoder state in test code.

--- a/jbig2_huffman.c
+++ b/jbig2_huffman.c
@@ -747,7 +747,7 @@
 {
     Jbig2Ctx *ctx;
     Jbig2HuffmanTable *tables[5];
-    Jbig2HuffmanState *hs;
+    Jbig2HuffmanState *hs = NULL;
     Jbig2WordStream ws;
     bool oob;
     int32_t code;
@@ -799,6 +799,7 @@
     success = 1;
 
 cleanup:
+    jbig2_huffman_free(ctx, hs);
     for (i = 0; i < 5; i++)
         jbig2_release_huffman_table(ctx, tables[i]);
     jbig2_ctx_free(ctx);