[gs-bugs] [Bug 690605] New: Fix memleak in jbig2 processing
bugs.ghostscript.com-bugzilla-daemon at ghostscript.com
bugs.ghostscript.com-bugzilla-daemon at ghostscript.com
Mon Jul 6 19:37:32 PDT 2009
http://bugs.ghostscript.com/show_bug.cgi?id=690605
Summary: Fix memleak in jbig2 processing
Product: MuPDF
Version: unspecified
Platform: Macintosh
OS/Version: MacOS X
Status: NEW
Severity: normal
Priority: P4
Component: mupdf
AssignedTo: tor.andersson at artifex.com
ReportedBy: kkowalczyk at gmail.com
QAContact: gs-bugs at ghostscript.com
A recent change added creating global jbig2 context when processing some jbig2
images, but didn't add code to free it, creating a leak. This patch fixes it:
Index: fitz/filt_jbig2d.c
===================================================================
--- fitz/filt_jbig2d.c (revision 1236)
+++ fitz/filt_jbig2d.c (working copy)
@@ -46,6 +46,7 @@
{
FZ_NEWFILTER(fz_jbig2d, d, jbig2d);
d->ctx = jbig2_ctx_new(nil, JBIG2_OPTIONS_EMBEDDED, nil, nil, nil);
+ d->gctx = nil;
d->page = nil;
d->idx = 0;
return fz_okay;
@@ -56,6 +57,8 @@
{
fz_jbig2d *d = (fz_jbig2d*)filter;
jbig2_ctx_free(d->ctx);
+ if (d->gctx)
+ jbig2_global_ctx_free(d->gctx);
}
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.
More information about the gs-bugs
mailing list