lib: check talloc success in compact