From 7307a7f232b27b22176b8f68364e43e09ce393cc Mon Sep 17 00:00:00 2001 From: Sebastian Rasmussen Date: Wed, 20 Dec 2017 02:32:55 +0100 Subject: 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. --- source/fitz/pixmap.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source') 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; -- cgit v1.2.3