diff options
author | Guillaume Cottenceau <gc@mandriva.com> | 2002-02-26 16:06:00 +0000 |
---|---|---|
committer | Guillaume Cottenceau <gc@mandriva.com> | 2002-02-26 16:06:00 +0000 |
commit | e1e761c3038a991cfa7a459cba09d295d5c2d759 (patch) | |
tree | a7cb6a5971b4177931822c1ae3ce18660bd7d6ef /mdk-stage1 | |
parent | b82f3f2e524743ec0b20fee9ac3531fa0d729712 (diff) | |
download | drakx-backup-do-not-use-e1e761c3038a991cfa7a459cba09d295d5c2d759.tar drakx-backup-do-not-use-e1e761c3038a991cfa7a459cba09d295d5c2d759.tar.gz drakx-backup-do-not-use-e1e761c3038a991cfa7a459cba09d295d5c2d759.tar.bz2 drakx-backup-do-not-use-e1e761c3038a991cfa7a459cba09d295d5c2d759.tar.xz drakx-backup-do-not-use-e1e761c3038a991cfa7a459cba09d295d5c2d759.zip |
don't segfault when fclose(NULL)
Diffstat (limited to 'mdk-stage1')
-rw-r--r-- | mdk-stage1/dietlibc/libstdio/fclose.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/mdk-stage1/dietlibc/libstdio/fclose.c b/mdk-stage1/dietlibc/libstdio/fclose.c index 6958a48e7..a955c6086 100644 --- a/mdk-stage1/dietlibc/libstdio/fclose.c +++ b/mdk-stage1/dietlibc/libstdio/fclose.c @@ -7,6 +7,8 @@ int fclose(FILE *stream) { #ifdef WANT_BUFFERED_STDIO FILE *f,*fl; #endif + if (!stream) + return EOF; fflush(stream); res=close(stream->fd); #ifdef WANT_BUFFERED_STDIO |