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:
James Zern 2012-05-08 16:47:12 -07:00
parent 89d803c423
commit a8e725f800

View File

@ -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;