void UJFree()

in src/ujdecode.c [358:375]


void UJFree(void *state)
{
	struct DecoderState *ds = (struct DecoderState *) state;

	HeapSlab *slab = ds->heap;
	HeapSlab *next;
	while (slab)
	{
		next = slab->next;

		if (slab->owned)
		{
			ds->free(slab);
		}

		slab = next;
	}
}