summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorSebastian Rasmussen <sebras@gmail.com>2016-12-01 06:03:08 -0500
committerSebastian Rasmussen <sebras@gmail.com>2016-12-14 16:31:13 +0100
commitffc4b61e6baf7a4d4e34c8901ae78ffd57da2530 (patch)
treea9e5b2dda8389ac5fa6a82dbca7ad38d29482e17 /platform
parenteaadcc85e04f4c0f3ca65b62db86a72657ba6fcc (diff)
downloadmupdf-ffc4b61e6baf7a4d4e34c8901ae78ffd57da2530.tar.xz
Bug 697392: Close device before dropping it.
Diffstat (limited to 'platform')
-rw-r--r--platform/ios/Classes/MuPrintPageRenderer.m1
-rw-r--r--platform/ios/common.m1
2 files changed, 2 insertions, 0 deletions
diff --git a/platform/ios/Classes/MuPrintPageRenderer.m b/platform/ios/Classes/MuPrintPageRenderer.m
index 4bdc67b4..ad03f6c5 100644
--- a/platform/ios/Classes/MuPrintPageRenderer.m
+++ b/platform/ios/Classes/MuPrintPageRenderer.m
@@ -113,6 +113,7 @@ static void renderPage(fz_document *doc, fz_page *page, fz_pixmap *pix, fz_matri
dev = fz_new_draw_device(ctx, ctm, pix);
fz_clear_pixmap_with_value(ctx, pix, 0xFF);
fz_run_page(ctx, page, dev, &fz_identity, NULL);
+ fz_close_device(ctx, dev);
}
fz_always(ctx)
{
diff --git a/platform/ios/common.m b/platform/ios/common.m
index 310a08fc..232f3b29 100644
--- a/platform/ios/common.m
+++ b/platform/ios/common.m
@@ -25,6 +25,7 @@ int search_page(fz_document *doc, int number, char *needle, fz_cookie *cookie)
fz_stext_page *text = fz_new_stext_page(ctx, fz_bound_page(ctx, page, &mediabox));
fz_device *dev = fz_new_stext_device(ctx, sheet, text, NULL);
fz_run_page(ctx, page, dev, &fz_identity, cookie);
+ fz_close_device(ctx, dev);
fz_drop_device(ctx, dev);
hit_count = fz_search_stext_page(ctx, text, needle, hit_bbox, nelem(hit_bbox));