summaryrefslogtreecommitdiff
path: root/draw/draw_device.c
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2012-03-09 15:31:45 +0000
committerRobin Watts <robin.watts@artifex.com>2012-03-09 15:31:45 +0000
commit2c4cf00383752127bc27164b491f31ac17bd2478 (patch)
treedbe8b609a9eec6e72ba9564e395fa5adf8bec444 /draw/draw_device.c
parent172dbb4c6655fbf9b92e455e2242d231551d51e5 (diff)
downloadmupdf-2c4cf00383752127bc27164b491f31ac17bd2478.tar.xz
Fix overeager cleanup code.
In the cancel or error case, we cleanup pixmaps left on the draw devices stack. We were cleaning up one layer more in the error code than in normal code, leading to a double free.
Diffstat (limited to 'draw/draw_device.c')
-rw-r--r--draw/draw_device.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/draw/draw_device.c b/draw/draw_device.c
index 65ee5a39..f40c6627 100644
--- a/draw/draw_device.c
+++ b/draw/draw_device.c
@@ -1582,9 +1582,6 @@ fz_draw_free_user(fz_device *devp)
state--;
}
while(--dev->top > 0);
- fz_drop_pixmap(ctx, dev->stack[0].mask);
- fz_drop_pixmap(ctx, dev->stack[0].dest);
- fz_drop_pixmap(ctx, dev->stack[0].shape);
}
if (dev->stack != &dev->init_stack[0])
fz_free(ctx, dev->stack);