func_curl: Fix leak of an ast_str in error handling code path.