diff options
author | Kuang-che Wu <kcwu@google.com> | 2016-12-10 02:58:24 +0800 |
---|---|---|
committer | Kuang-che Wu <kcwu@google.com> | 2016-12-10 02:58:24 +0800 |
commit | 81a1d693d6fb808e14a7064ff24c9f5149778d01 (patch) | |
tree | 28a0151d9b6eab2ad29fd4f926912815fab2d285 /src/cmstypes.c | |
parent | a3def7562bd72961b8dffb1aa601e304952a778c (diff) | |
download | lcms2-81a1d693d6fb808e14a7064ff24c9f5149778d01.tar.gz |
Fix memory leak in Type_LUT8_Read
Diffstat (limited to 'src/cmstypes.c')
-rw-r--r-- | src/cmstypes.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cmstypes.c b/src/cmstypes.c index b3006fd..bf51326 100644 --- a/src/cmstypes.c +++ b/src/cmstypes.c @@ -1816,8 +1816,10 @@ void *Type_LUT8_Read(struct _cms_typehandler_struct* self, cmsIOHANDLER* io, cms _cmsFree(self ->ContextID, Temp); Temp = NULL; - if (!cmsPipelineInsertStage(NewLUT, cmsAT_END, cmsStageAllocCLut16bit(self ->ContextID, CLUTpoints, InputChannels, OutputChannels, T))) + if (!cmsPipelineInsertStage(NewLUT, cmsAT_END, cmsStageAllocCLut16bit(self ->ContextID, CLUTpoints, InputChannels, OutputChannels, T))) { + _cmsFree(self ->ContextID, T); goto Error; + } _cmsFree(self ->ContextID, T); } |