Fix ast_error_finish() and err_input(): filename can be NULL

Fix my previous commit (r85569).
2 files changed