Skip to content
Permalink
Browse files

Fix a double free on error recovering

  • Loading branch information...
Marti Maria
Marti Maria committed Jul 10, 2013
1 parent 3d38474 commit fefaaa43c382eee632ea3ad0cfa915335140e1db
Showing with 6 additions and 1 deletion.
  1. +3 −0 ChangeLog
  2. +3 −1 src/cmscnvrt.c
@@ -125,3 +125,6 @@ Added some checks for non-happy path, mostly failing mallocs
-----------------------
2.5 Maintenance release
-----------------------

Fixed a double free in recovering from a previous error in default intent handler.

@@ -571,7 +571,9 @@ cmsPipeline* DefaultICCintents(cmsContext ContextID,
// Concatenate to the output LUT
if (!cmsPipelineCat(Result, Lut))
goto Error;

cmsPipelineFree(Lut);
Lut = NULL;

// Update current space
CurrentColorSpace = ColorSpaceOut;
@@ -581,7 +583,7 @@ cmsPipeline* DefaultICCintents(cmsContext ContextID,

Error:

cmsPipelineFree(Lut);
if (Lut != NULL) cmsPipelineFree(Lut);
if (Result != NULL) cmsPipelineFree(Result);
return NULL;

0 comments on commit fefaaa4

Please sign in to comment.
You can’t perform that action at this time.