mirror of
https://github.com/libretro/RetroArch
synced 2025-04-10 06:44:27 +00:00
(libchdr) Prevent memory leak
This commit is contained in:
parent
dc7c4fea2d
commit
bb05af0d92
@ -294,7 +294,10 @@ enum huffman_error huffman_import_tree_huffman(struct huffman_decoder* decoder,
|
|||||||
|
|
||||||
/* make sure we ended up with the right number */
|
/* make sure we ended up with the right number */
|
||||||
if (curcode != decoder->numcodes)
|
if (curcode != decoder->numcodes)
|
||||||
|
{
|
||||||
|
delete_huffman_decoder(smallhuff);
|
||||||
return HUFFERR_INVALID_DATA;
|
return HUFFERR_INVALID_DATA;
|
||||||
|
}
|
||||||
|
|
||||||
/* assign canonical codes for all nodes based on their code lengths */
|
/* assign canonical codes for all nodes based on their code lengths */
|
||||||
error = huffman_assign_canonical_codes(decoder);
|
error = huffman_assign_canonical_codes(decoder);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user