diff options
author | Robin Watts <Robin.Watts@artifex.com> | 2020-05-25 13:32:26 +0100 |
---|---|---|
committer | Robin Watts <Robin.Watts@artifex.com> | 2020-06-04 14:22:23 +0100 |
commit | eb492c353084600d94877f7157840d24dd7f9301 (patch) | |
tree | 5a7b84204a51dab5da8e05273af398d63ddad1a2 /lcms2mt/src/cmsnamed.c | |
parent | a83716a1657df0a63aafa6582f47a93315aa61a6 (diff) | |
download | ghostpdl-eb492c353084600d94877f7157840d24dd7f9301.tar.gz |
Update lcms2mt to lcms2-2.10rc2.
Diffstat (limited to 'lcms2mt/src/cmsnamed.c')
-rw-r--r-- | lcms2mt/src/cmsnamed.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lcms2mt/src/cmsnamed.c b/lcms2mt/src/cmsnamed.c index aac045b25..cd751b47f 100644 --- a/lcms2mt/src/cmsnamed.c +++ b/lcms2mt/src/cmsnamed.c @@ -1,7 +1,7 @@ //--------------------------------------------------------------------------------- // // Little Color Management System -// Copyright (c) 1998-2017 Marti Maria Saguer +// Copyright (c) 1998-2020 Marti Maria Saguer // // Permission is hereby granted, free of charge, to any person obtaining // a copy of this software and associated documentation files (the "Software"), @@ -541,7 +541,7 @@ cmsNAMEDCOLORLIST* CMSEXPORT cmsAllocNamedColorList(cmsContext ContextID, cmsUIn while (v -> Allocated < n) { if (!GrowNamedColorList(ContextID, v)) { - _cmsFree(ContextID, (void*) v); + cmsFreeNamedColorList(ContextID, v); return NULL; } } @@ -574,7 +574,11 @@ cmsNAMEDCOLORLIST* CMSEXPORT cmsDupNamedColorList(cmsContext ContextID, const cm // For really large tables we need this while (NewNC ->Allocated < v ->Allocated){ - if (!GrowNamedColorList(ContextID, NewNC)) return NULL; + if (!GrowNamedColorList(ContextID, NewNC)) + { + cmsFreeNamedColorList(ContextID, NewNC); + return NULL; + } } memmove(NewNC ->Prefix, v ->Prefix, sizeof(v ->Prefix)); |