Whamcloud - gitweb
git://git.whamcloud.com
/
tools
/
e2fsprogs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
484ddc8
)
debugfs: add matching fclose
author
Peng Tao
<bergwolf@gmail.com>
Mon, 28 Sep 2009 10:51:53 +0000
(18:51 +0800)
committer
Theodore Ts'o
<tytso@mit.edu>
Sun, 4 Oct 2009 02:30:37 +0000
(22:30 -0400)
If the cmd_file is not stdin, we should close the file handle via fclose().
Thanks David Binderman to point this out.
Addresses-Novell-Bugzilla: #524526
Signed-off-by: Peng Tao <bergwolf@gmail.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
debugfs/debugfs.c
patch
|
blob
|
history
diff --git
a/debugfs/debugfs.c
b/debugfs/debugfs.c
index
a72d800
..
be95e20
100644
(file)
--- a/
debugfs/debugfs.c
+++ b/
debugfs/debugfs.c
@@
-2133,6
+2133,8
@@
static int source_file(const char *cmd_file, int sci_idx)
exit_status++;
}
}
+ if (f != stdin)
+ fclose(f);
return exit_status;
}