bail if ast_calloc fails, this was done before but i accidently removed it when