diff options
author | Nils Larsch <nils@openssl.org> | 2006-01-30 00:12:22 +0100 |
---|---|---|
committer | Nils Larsch <nils@openssl.org> | 2006-01-30 00:12:22 +0100 |
commit | 8c5a2bd6bb9a8c2bb3e1b63c03e57bb1115275d1 (patch) | |
tree | 6f47255125d6970ab07881a58be1e7df1e4e9490 /crypto/bio/bss_file.c | |
parent | Fixes for BOOL handling: produce errors for invalid string for mini-compiler, (diff) | |
download | openssl-8c5a2bd6bb9a8c2bb3e1b63c03e57bb1115275d1.tar.xz openssl-8c5a2bd6bb9a8c2bb3e1b63c03e57bb1115275d1.zip |
add additional checks + cleanup
Submitted by: David Hartman <david_hartman@symantec.com>
Diffstat (limited to 'crypto/bio/bss_file.c')
-rw-r--r-- | crypto/bio/bss_file.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/crypto/bio/bss_file.c b/crypto/bio/bss_file.c index 9e161b17f5..b7504baf20 100644 --- a/crypto/bio/bss_file.c +++ b/crypto/bio/bss_file.c @@ -128,7 +128,10 @@ BIO *BIO_new_file(const char *filename, const char *mode) return(NULL); } if ((ret=BIO_new(BIO_s_file())) == NULL) + { + fclose(file); return(NULL); + } BIO_clear_flags(ret,BIO_FLAGS_UPLINK); /* we did fopen -> we disengage UPLINK */ BIO_set_fp(ret,file,BIO_CLOSE); |