diff options
author | Robin Watts <Robin.Watts@artifex.com> | 2016-04-03 18:58:10 +0200 |
---|---|---|
committer | Robin Watts <Robin.Watts@artifex.com> | 2016-04-04 20:12:06 +0200 |
commit | ff574225d80a771a32377783ff0a70ea28af1991 (patch) | |
tree | cf8da6048769a0c3b2e599014becd046a9ff2c31 | |
parent | 1beb60e78c5bb1f0abe6d4f30ac1777f611c0c3d (diff) | |
download | mupdf-ff574225d80a771a32377783ff0a70ea28af1991.tar.xz |
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.
-rw-r--r-- | source/fitz/context.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) { |