mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +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 */
|
||||
if (curcode != decoder->numcodes)
|
||||
{
|
||||
delete_huffman_decoder(smallhuff);
|
||||
return HUFFERR_INVALID_DATA;
|
||||
}
|
||||
|
||||
/* assign canonical codes for all nodes based on their code lengths */
|
||||
error = huffman_assign_canonical_codes(decoder);
|
||||
|
Loading…
x
Reference in New Issue
Block a user