summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>1999-09-30 02:49:44 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>1999-09-30 02:49:44 (GMT)
commit03d438979b7bc6a08d25d121676bbd2083254c80 (patch)
tree3f84ef78766cf9695bb37b3d1bf26b0e25c011e2
parent7c7bedb1ad91b4d0da2a8de0b0fd0a45cb934699 (diff)
downloadhdf5-03d438979b7bc6a08d25d121676bbd2083254c80.zip
hdf5-03d438979b7bc6a08d25d121676bbd2083254c80.tar.gz
hdf5-03d438979b7bc6a08d25d121676bbd2083254c80.tar.bz2
[svn-r1696] Closed file handle leak for some failure cases.
-rw-r--r--src/H5F.c2
-rw-r--r--src/H5private.h7
2 files changed, 5 insertions, 4 deletions
diff --git a/src/H5F.c b/src/H5F.c
index 508047b..8df9104 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -994,6 +994,7 @@ H5F_open(const char *name, uintn flags, hid_t fcpl_id, hid_t fapl_id)
* exists), or if the new request adds write access (since the
* readers don't expect the file to change under them).
*/
+ H5FD_close(lf);
if (flags & H5F_ACC_TRUNC) {
file = NULL; /*to prevent destruction of wrong file*/
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL,
@@ -1009,7 +1010,6 @@ H5F_open(const char *name, uintn flags, hid_t fcpl_id, hid_t fapl_id)
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL,
"file is already open for read-only");
}
- H5FD_close(lf);
file = H5F_new(file->shared, fcpl_id, fapl_id);
lf = file->shared->lf;
} else if (flags!=tent_flags) {
diff --git a/src/H5private.h b/src/H5private.h
index c2eecd4..d5985cb 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -379,10 +379,11 @@ typedef double float32;
# error "nothing appropriate for float32"
#endif
-#if SIZEOF_FLOAT>=8
-typedef float float64;
-#elif SIZEOF_DOUBLE>=8
+/* Bias float64 toward using double - QAK */
+#if SIZEOF_DOUBLE>=8
typedef double float64;
+#elif SIZEOF_FLOAT>=8
+typedef float float64;
#else
# error "nothing appropriate for float64"
#endif