--- old/src/java.desktop/share/native/liblcms/cmsnamed.c 2020-08-27 15:57:44.518103078 -0700 +++ new/src/java.desktop/share/native/liblcms/cmsnamed.c 2020-08-27 15:57:44.286103082 -0700 @@ -30,7 +30,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"), @@ -567,7 +567,7 @@ while (v -> Allocated < n) { if (!GrowNamedColorList(v)) { - _cmsFree(ContextID, (void*) v); + cmsFreeNamedColorList(v); return NULL; } } @@ -600,7 +600,11 @@ // For really large tables we need this while (NewNC ->Allocated < v ->Allocated){ - if (!GrowNamedColorList(NewNC)) return NULL; + if (!GrowNamedColorList(NewNC)) + { + cmsFreeNamedColorList(NewNC); + return NULL; + } } memmove(NewNC ->Prefix, v ->Prefix, sizeof(v ->Prefix));