summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2015-07-20 16:21:50 +0100
committerRobin Watts <robin.watts@artifex.com>2015-07-20 16:23:46 +0100
commit8bece7529ad8752f58d22e7cc3d5aaf7e4741595 (patch)
tree1ad76297fbb0cd985f4cc1c0f27c952ea82422f4 /source
parent2a3df1de7b2a97519b8605a98a3d2c21d3d57859 (diff)
downloadmupdf-8bece7529ad8752f58d22e7cc3d5aaf7e4741595.tar.xz
Fix leak in separations code.
Include code to free the list of separation names.
Diffstat (limited to 'source')
-rw-r--r--source/fitz/separation.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/fitz/separation.c b/source/fitz/separation.c
index ade8173b..e18691cf 100644
--- a/source/fitz/separation.c
+++ b/source/fitz/separation.c
@@ -49,7 +49,11 @@ void fz_drop_separations(fz_context *ctx, fz_separations *sep)
sep->refs--;
fz_unlock(ctx, FZ_LOCK_ALLOC);
if (i == 1)
+ {
+ for (i = 0; i < sep->num_separations; i++)
+ fz_free(ctx, sep->name[i]);
fz_free(ctx, sep);
+ }
}
void fz_add_separation(fz_context *ctx, fz_separations *sep, uint32_t rgb, uint32_t cmyk, char *name)