PaletteSortModifiedZeng: fix leak on error

Change-Id: I462bd9a3bc4670efdf251c295f6771a38c08a6ce
(cherry picked from commit 0edbb6ea71)
This commit is contained in:
James Zern 2023-02-23 22:01:20 -08:00
parent b24b22fbc8
commit d2d5a51b13

View File

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