Prevent another memory leak
This commit is contained in:
parent
3d9d5320ad
commit
608bc45388
|
@ -300,7 +300,10 @@ enum huffman_error huffman_import_tree_huffman(struct huffman_decoder* decoder,
|
|||
/* assign canonical codes for all nodes based on their code lengths */
|
||||
error = huffman_assign_canonical_codes(decoder);
|
||||
if (error != HUFFERR_NONE)
|
||||
{
|
||||
delete_huffman_decoder(smallhuff);
|
||||
return error;
|
||||
}
|
||||
|
||||
/* build the lookup table */
|
||||
huffman_build_lookup_table(decoder);
|
||||
|
|
Loading…
Reference in New Issue