From: lizf Date: Mon, 22 Oct 2007 03:27:15 +0000 (+0800) Subject: tailf: opened file leaving unclosed X-Git-Tag: v2.14-rc1~193 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8d26614050d6833fc668812ae1670e77e4582f92;p=thirdparty%2Futil-linux.git tailf: opened file leaving unclosed Signed-off-by: Li Zefan --- diff --git a/text-utils/tailf.c b/text-utils/tailf.c index 12dca29349..f4616ccb88 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)