diff options
author | Robin Watts <robin.watts@artifex.com> | 2015-07-20 16:21:50 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2015-07-20 16:23:46 +0100 |
commit | 8bece7529ad8752f58d22e7cc3d5aaf7e4741595 (patch) | |
tree | 1ad76297fbb0cd985f4cc1c0f27c952ea82422f4 /source | |
parent | 2a3df1de7b2a97519b8605a98a3d2c21d3d57859 (diff) | |
download | mupdf-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.c | 4 |
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) |