From 2fc16b96f00bbf0fa7c285d900c7fa9d8314b10f Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Sun, 23 Aug 2009 16:23:00 +0200 Subject: Free csi->tree in fz_dropcsi, fixing a memory leak when the content stream interpreter is dropped on a parsing error. --- mupdf/pdf_interpret.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mupdf/pdf_interpret.c b/mupdf/pdf_interpret.c index b6f84679..744c3253 100644 --- a/mupdf/pdf_interpret.c +++ b/mupdf/pdf_interpret.c @@ -139,6 +139,8 @@ pdf_dropcsi(pdf_csi *csi) if (csi->gstate[csi->gtop].stroke.cs) fz_dropcolorspace(csi->gstate[csi->gtop].stroke.cs); + if (csi->tree) fz_droptree(csi->tree); + if (csi->path) fz_dropnode((fz_node*)csi->path); if (csi->textclip) fz_dropnode((fz_node*)csi->textclip); if (csi->text) fz_dropnode((fz_node*)csi->text); -- cgit v1.2.3