[PATCH 1/4] misc-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>

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

diff --git a/misc-utils/setterm.c b/misc-utils/setterm.c
index 5d889ea..4e8e274 100644
--- a/misc-utils/setterm.c
+++ b/misc-utils/setterm.c
@@ -1166,6 +1166,8 @@ screendump(int vcnum, FILE *F) {
 	fprintf(stderr, _("Error writing screendump\n"));
 	exit(1);
     }
+
+    close(fd);
     return;
 
 error:
-- 
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