diff options
author | Sebastian Rasmussen <sebras@gmail.com> | 2017-12-20 02:32:55 +0100 |
---|---|---|
committer | Sebastian Rasmussen <sebras@gmail.com> | 2017-12-20 02:33:55 +0100 |
commit | 7307a7f232b27b22176b8f68364e43e09ce393cc (patch) | |
tree | 8db11be7a7f5051e927b4085da791c7056ab05b0 | |
parent | 5e84be24c9cdec8e2822b37a9e979f0db10784e8 (diff) | |
download | mupdf-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.
-rw-r--r-- | source/fitz/pixmap.c | 1 |
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; |