From 8d26614050d6833fc668812ae1670e77e4582f92 Mon Sep 17 00:00:00 2001 From: lizf Date: Mon, 22 Oct 2007 11:27:15 +0800 Subject: [PATCH] tailf: opened file leaving unclosed Signed-off-by: Li Zefan --- text-utils/tailf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/text-utils/tailf.c b/text-utils/tailf.c index 12dca293..f4616ccb 100644 --- a/text-utils/tailf.c +++ b/text-utils/tailf.c @@ -77,6 +77,8 @@ static void tailf(const char *filename, int lines) for (i = 0; i < lines; i++) free(buffer[i]); free(buffer); + + fclose(str); } int main(int argc, char **argv) -- 2.39.5