From: lizf Date: Mon, 22 Oct 2007 03:27:15 +0000 (+0800) Subject: tailf: opened file leaving unclosed X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8d26614050d6833fc668812ae1670e77e4582f92;p=util-linux tailf: opened file leaving unclosed Signed-off-by: Li Zefan --- 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)