There was a memory leak in the libjit block administration for functions. The deleted block chain was not buildup correctly. Therefore, blocks deleted during optimization were never freed.

Changed this:

/* Block may not be deleted right when it was found useless from
the control flow perspective as it might be referenced from
elsewhere, for instance, from some jit_value_t */
static void
delete_block(jit_block_t block)
{
jit_free(block->succs);
block->succs = 0;
jit_free(block->preds);
block->preds = 0;
jit_free(block->insns);
block->insns = 0;