From 8bece7529ad8752f58d22e7cc3d5aaf7e4741595 Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Mon, 20 Jul 2015 16:21:50 +0100 Subject: Fix leak in separations code. Include code to free the list of separation names. --- source/fitz/separation.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source') 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) -- cgit v1.2.3