Merge "PaletteSortModifiedZeng: fix leak on error" into 1.2.4

This commit is contained in:
James Zern 2023-03-01 01:02:47 +00:00 committed by Gerrit Code Review
commit 0aa5f755c6

View File

@ -259,6 +259,7 @@ static int PaletteSortModifiedZeng(
return 0; return 0;
} }
if (!CoOccurrenceBuild(pic, palette_sorted, num_colors, cooccurrence)) { if (!CoOccurrenceBuild(pic, palette_sorted, num_colors, cooccurrence)) {
WebPSafeFree(cooccurrence);
return 0; return 0;
} }