1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 23:07:35 +00:00

wc: Remove a memory leak.

This commit is contained in:
Emanuele Torre 2021-01-12 00:58:07 +01:00 committed by Andreas Kling
parent dcd259a100
commit 9dc44bf8c4

View file

@ -85,6 +85,10 @@ static Count get_count(const String& file_specifier)
count.words++;
}
}
if (file_pointer != stdin)
fclose(file_pointer);
return count;
}