mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-26 13:48:21 +01:00
enc/vp8l: fix double free on error
GetHuffBitLengthsAndCodes and the caller would both free bit_lengths/bit_codes Change-Id: I1b62ff727c82567f11c39a847f74fe765b5f527c
This commit is contained in:
parent
89d803c423
commit
a8e725f800
@ -338,6 +338,8 @@ static int GetHuffBitLengthsAndCodes(
|
||||
for (idx = 0; idx <= 5 * i + k; ++idx) {
|
||||
free(bit_lengths[idx]);
|
||||
free(bit_codes[idx]);
|
||||
bit_lengths[idx] = NULL;
|
||||
bit_codes[idx] = NULL;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user