summaryrefslogtreecommitdiff
path: root/source/fitz
diff options
context:
space:
mode:
authorSebastian Rasmussen <sebras@gmail.com>2017-12-20 02:32:55 +0100
committerSebastian Rasmussen <sebras@gmail.com>2017-12-20 02:33:55 +0100
commit7307a7f232b27b22176b8f68364e43e09ce393cc (patch)
tree8db11be7a7f5051e927b4085da791c7056ab05b0 /source/fitz
parent5e84be24c9cdec8e2822b37a9e979f0db10784e8 (diff)
downloadmupdf-7307a7f232b27b22176b8f68364e43e09ce393cc.tar.xz
Bug 698827: Correct reference counting when creating pixmap from pixmap.
Previously the copy had as many reference counts as the original pixmap which lead to leaks of pixmaps.
Diffstat (limited to 'source/fitz')
-rw-r--r--source/fitz/pixmap.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/fitz/pixmap.c b/source/fitz/pixmap.c
index 93f8fed6..d3d8b847 100644
--- a/source/fitz/pixmap.c
+++ b/source/fitz/pixmap.c
@@ -148,6 +148,7 @@ fz_pixmap *fz_new_pixmap_from_pixmap(fz_context *ctx, fz_pixmap *pixmap, const f
subpix = fz_malloc_struct(ctx, fz_pixmap);
*subpix = *pixmap;
+ subpix->storable.refs = 1;
subpix->x = rect->x0;
subpix->y = rect->y0;
subpix->w = rect->x1 - rect->x0;