summaryrefslogtreecommitdiff
path: root/source/svg
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2016-04-15 14:01:59 +0100
committerTor Andersson <tor.andersson@artifex.com>2016-04-26 15:12:57 +0200
commite6d0412c976ecb355dbb142e2803bc63f4c23a9b (patch)
tree5240754c814ac0b5613ec09ce5de71850eae88c5 /source/svg
parentd8ebcc7b59fc20b1dd3ea7887c6d3ad2859b3698 (diff)
downloadmupdf-e6d0412c976ecb355dbb142e2803bc63f4c23a9b.tar.xz
Fix refcounting on SVG documents.
Diffstat (limited to 'source/svg')
-rw-r--r--source/svg/svg-doc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/svg/svg-doc.c b/source/svg/svg-doc.c
index f08cceb2..add0860e 100644
--- a/source/svg/svg-doc.c
+++ b/source/svg/svg-doc.c
@@ -94,7 +94,7 @@ svg_open_document_with_stream(fz_context *ctx, fz_stream *file)
root = fz_parse_xml(ctx, buf->data, buf->len, 0);
fz_drop_buffer(ctx, buf);
- doc = fz_malloc_struct(ctx, svg_document);
+ doc = Memento_label(fz_new_document(ctx, sizeof(svg_document)), "svg_document");
doc->super.close = svg_close_document;
doc->super.count_pages = svg_count_pages;
doc->super.load_page = svg_load_page;