diff --git a/xmllint.c b/xmllint.c index 25c6fb98..6e4138e9 100644 --- a/xmllint.c +++ b/xmllint.c @@ -2175,6 +2175,8 @@ static void parseAndPrintFile(char *filename, xmlParserCtxtPtr rectxt) { doc = NULL; } } + if (f != stdin) + fclose(f); } } else #endif /* LIBXML_PUSH_ENABLED */