Prevent another memory leak

This commit is contained in:
twinaphex 2017-10-06 05:25:05 +02:00
parent 3d9d5320ad
commit 608bc45388

View File

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