summaryrefslogtreecommitdiffstats
path: root/crypto/bio/bss_file.c
diff options
context:
space:
mode:
authorNils Larsch <nils@openssl.org>2006-02-08 19:16:33 +0000
committerNils Larsch <nils@openssl.org>2006-02-08 19:16:33 +0000
commit22d1087e16cff731d27c890f84757652d98303c1 (patch)
tree5a788aea06a917bd9913bc6d14546dc8e62ed576 /crypto/bio/bss_file.c
parent9f85fcefdce92ea8746937f20f9f2fbe384c2095 (diff)
downloadopenssl-22d1087e16cff731d27c890f84757652d98303c1.tar.gz
backport recent changes from the cvs head
Diffstat (limited to 'crypto/bio/bss_file.c')
-rw-r--r--crypto/bio/bss_file.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/crypto/bio/bss_file.c b/crypto/bio/bss_file.c
index ad4b301388..b277367da3 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_internal())) == 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);