diff options
author | Robin Watts <robin.watts@artifex.com> | 2012-03-09 15:31:45 +0000 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2012-03-09 15:31:45 +0000 |
commit | 2c4cf00383752127bc27164b491f31ac17bd2478 (patch) | |
tree | dbe8b609a9eec6e72ba9564e395fa5adf8bec444 /draw/draw_device.c | |
parent | 172dbb4c6655fbf9b92e455e2242d231551d51e5 (diff) | |
download | mupdf-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.c | 3 |
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); |