OSDN Git Service
(root)
/
android-x86
/
external-e2fsprogs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c510d6f
)
debugfs: don't try to fclose NULL
author
Eric Sandeen
<sandeen@redhat.com>
Fri, 26 Jun 2009 18:57:39 +0000
(13:57 -0500)
committer
Theodore Ts'o
<tytso@mit.edu>
Mon, 29 Jun 2009 05:07:29 +0000
(
01:07
-0400)
do_logdump may jump to errout if fopen(out_file) fails,
but in that case out_file is NULL, and fclose will segfault.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
debugfs/logdump.c
patch
|
blob
|
history
diff --git
a/debugfs/logdump.c
b/debugfs/logdump.c
index
4818bc6
..
9a7108a
100644
(file)
--- a/
debugfs/logdump.c
+++ b/
debugfs/logdump.c
@@
-259,7
+259,7
@@
void do_logdump(int argc, char **argv)
close(journal_fd);
errout:
- if (out_file
!= stdout
)
+ if (out_file
&& (out_file != stdout)
)
fclose(out_file);
return;