From ff574225d80a771a32377783ff0a70ea28af1991 Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Sun, 3 Apr 2016 18:58:10 +0200 Subject: Fix multi-threaded leak of style context. Either the style context shouldn't be shared, or it shouldn't be incremented when we clone it. Sharing it seems correct to me, but we should protect reading it against simultaneous changes. --- source/fitz/context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/fitz/context.c b/source/fitz/context.c index 52c225e9..0f9a8b77 100644 --- a/source/fitz/context.c +++ b/source/fitz/context.c @@ -143,7 +143,6 @@ new_context_phase1(const fz_alloc_context *alloc, const fz_locks_context *locks) fz_try(ctx) { fz_new_aa_context(ctx); - fz_new_style_context(ctx); } fz_catch(ctx) { @@ -188,6 +187,7 @@ fz_new_context_imp(const fz_alloc_context *alloc, const fz_locks_context *locks, fz_new_font_context(ctx); fz_new_id_context(ctx); fz_new_document_handler_context(ctx); + fz_new_style_context(ctx); } fz_catch(ctx) { -- cgit v1.2.3