From d2d5a51b13869b2db5ad20b584f8785dc5f84dc4 Mon Sep 17 00:00:00 2001 From: James Zern Date: Thu, 23 Feb 2023 22:01:20 -0800 Subject: [PATCH] PaletteSortModifiedZeng: fix leak on error Change-Id: I462bd9a3bc4670efdf251c295f6771a38c08a6ce (cherry picked from commit 0edbb6ea7176eca19955be701178fa70ecb497ee) --- src/enc/vp8l_enc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/enc/vp8l_enc.c b/src/enc/vp8l_enc.c index 2b345df6..e0b2649d 100644 --- a/src/enc/vp8l_enc.c +++ b/src/enc/vp8l_enc.c @@ -259,6 +259,7 @@ static int PaletteSortModifiedZeng( return 0; } if (!CoOccurrenceBuild(pic, palette_sorted, num_colors, cooccurrence)) { + WebPSafeFree(cooccurrence); return 0; }