summaryrefslogtreecommitdiffstats
path: root/text-utils
diff options
context:
space:
mode:
authorlizf2007-10-22 05:27:15 +0200
committerKarel Zak2007-10-26 01:02:45 +0200
commit8d26614050d6833fc668812ae1670e77e4582f92 (patch)
tree4835e7adcdc032a21d7fecff3b0fb78afc5633b9 /text-utils
parentblockdev: fix: opened file leaving unclosed (diff)
downloadkernel-qcow2-util-linux-8d26614050d6833fc668812ae1670e77e4582f92.tar.gz
kernel-qcow2-util-linux-8d26614050d6833fc668812ae1670e77e4582f92.tar.xz
kernel-qcow2-util-linux-8d26614050d6833fc668812ae1670e77e4582f92.zip
tailf: opened file leaving unclosed
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Diffstat (limited to 'text-utils')
-rw-r--r--text-utils/tailf.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/text-utils/tailf.c b/text-utils/tailf.c
index 12dca2934..f4616ccb8 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)