Janitor: use ast_free to pair calls of ast_malloc and ast_calloc