Change halloc_set_allocator to only set on success.