debugfs: add matching fclose
PATCH 1/1 debugfs: add matching fclose
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 <[email protected]>
--- debugfs/debugfs.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
debugfs/debugfs.c +2 -0
@@ -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; }
Signature · 1 line
1.6.5.rc2.262.g5224f
Theodore Tso
AppliedQuoted 6 lines · Peng Tao
If the
cmd_fileis not stdin, we should close the file handle viafclose(). Thanks David Binderman to point this out.Addresses-Novell-Bugzilla: #524526
Signed-off-by Peng Tao <[email protected]>
Applied to the maint branch, thanks.
- Ted