From 221915518d71c1ba3585addbe7cff49bba96f175 Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Tue, 30 Jun 2015 13:37:29 +0100 Subject: Bug 696061: Fix leak of xml block. Bug 696061 showed GhostXPS crashing with a SEGV. Checking MuPDF showed that a fix had already been applied here, but Memento shows that the fix was causing a leak. We therefore patch the leak here. --- source/xps/xps-resource.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/xps') diff --git a/source/xps/xps-resource.c b/source/xps/xps-resource.c index 712ed1cc..a625d13b 100644 --- a/source/xps/xps-resource.c +++ b/source/xps/xps-resource.c @@ -95,6 +95,8 @@ xps_parse_remote_resource_dictionary(fz_context *ctx, xps_document *doc, char *b dict = xps_parse_resource_dictionary(ctx, doc, part_uri, xml); if (dict) dict->base_xml = xml; /* pass on ownership */ + else + fz_drop_xml(ctx, xml); return dict; } -- cgit v1.2.3