color-lcms: Fix memory leak in join_curvesets

LCMS API cmsStageAllocToneCurves uses cmsDupToneCurve which internally
re-allocates a new table of points. As a result, we have to free the old
table returned from lcmsJoinToneCurve.

Signed-off-by: Vitaly Prosyak <vitaly.prosyak@amd.com>
This commit is contained in:
Vitaly Prosyak 2023-04-10 20:48:34 -04:00
parent 052e63eecf
commit 712fd0f576

View file

@ -376,7 +376,7 @@ join_curvesets(cmsContext context_id, const cmsStage *prev,
ret = cmsStageAllocToneCurves(context_id, ARRAY_LENGTH(arr), arr);
abort_oom_if_null(ret);
cmsFreeToneCurveTriple(arr);
return ret;
}