]> err.no Git - util-linux/commitdiff
tailf: opened file leaving unclosed
authorlizf <lizf@cn.fujitsu.com>
Mon, 22 Oct 2007 03:27:15 +0000 (11:27 +0800)
committerKarel Zak <kzak@redhat.com>
Thu, 25 Oct 2007 23:02:45 +0000 (01:02 +0200)
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
text-utils/tailf.c

index 12dca2934933cf58472debac5107255b0ace9be7..f4616ccb881ae88e51fbc83ac40686e049223df0 100644 (file)
@@ -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)