summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2012-02-21 17:17:30 +0000
committerRobin Watts <robin.watts@artifex.com>2012-02-22 16:16:38 +0000
commit7c19fd50ea7ee9dfd253220a0ea2cac4df7d6345 (patch)
tree740a3a1381f52bc84f7fc6404e364b8f462913d4
parentc732cd69db005902289829867a71e0d271809aba (diff)
downloadmupdf-7c19fd50ea7ee9dfd253220a0ea2cac4df7d6345.tar.xz
Fix a double free on an error path.
-rw-r--r--fitz/res_pixmap.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fitz/res_pixmap.c b/fitz/res_pixmap.c
index dbed0842..500eb4be 100644
--- a/fitz/res_pixmap.c
+++ b/fitz/res_pixmap.c
@@ -65,6 +65,8 @@ fz_new_pixmap_with_data(fz_context *ctx, fz_colorspace *colorspace, int w, int h
}
fz_catch(ctx)
{
+ if (colorspace)
+ fz_drop_colorspace(ctx, colorspace);
fz_free(ctx, pix);
fz_rethrow(ctx);
}