From d23169349f1b730c1c2d3771971641e75aafb719 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 0b07e529..cb5549af 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; }