[PATCH 4/4] text-utils: fix: opened file leaving unclosed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Li Zefan <lizf@xxxxxxxxxxxxxx>

---
 text-utils/tailf.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/text-utils/tailf.c b/text-utils/tailf.c
index 79a194d..4a0258e 100644
--- a/text-utils/tailf.c
+++ b/text-utils/tailf.c
@@ -81,6 +81,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)
-- 
1.5.3.rc7


-
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux