diff options
-rw-r--r-- | Userland/wc.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Userland/wc.cpp b/Userland/wc.cpp index 0cdeb0ad46..cf9fa62d35 100644 --- a/Userland/wc.cpp +++ b/Userland/wc.cpp @@ -85,6 +85,10 @@ static Count get_count(const String& file_specifier) count.words++; } } + + if (file_pointer != stdin) + fclose(file_pointer); + return count; } |