summaryrefslogtreecommitdiffstats
path: root/hl/src
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2009-12-17 22:38:50 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2009-12-17 22:38:50 (GMT)
commit80385ab8dd171a8410bd8e7dfce0e6b679c3fc97 (patch)
treef3ed5401e74382b5f316a7057c091d6c336ef0a1 /hl/src
parent0db6255d805b625f3fbbbb0b0893032af229d234 (diff)
downloadhdf5-80385ab8dd171a8410bd8e7dfce0e6b679c3fc97.zip
hdf5-80385ab8dd171a8410bd8e7dfce0e6b679c3fc97.tar.gz
hdf5-80385ab8dd171a8410bd8e7dfce0e6b679c3fc97.tar.bz2
[svn-r18032] Description:
Bring r18031 from trunk to 1.8 branch: Bring r18030 from merge_metadata_journaling branch to trunk: Bring "brush clearing" changes (whitespace & style issues, mostly) from metadata_journaling branch to the "merging" branch, to converge the trunk and the metadata_journaling branch. Also, some other minor cleanups along the way. Tested on: FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode (h5committested on trunk)
Diffstat (limited to 'hl/src')
-rw-r--r--hl/src/H5PT.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/hl/src/H5PT.c b/hl/src/H5PT.c
index 10d2637..3d16db5 100644
--- a/hl/src/H5PT.c
+++ b/hl/src/H5PT.c
@@ -214,6 +214,11 @@ out:
*
* Modifications:
*
+ * John Mainzer -- 4/23/08
+ * Added error check on malloc of table, initialized fields
+ * in table to keep lower level code from choking on bogus
+ * data in error cases.
+ *
*-------------------------------------------------------------------------
*/
hid_t H5PTopen( hid_t loc_id,
@@ -232,6 +237,12 @@ hid_t H5PTopen( hid_t loc_id,
table = (htbl_t *)malloc(sizeof(htbl_t));
+ if ( table == NULL ) {
+ goto out;
+ }
+ table->dset_id = H5I_BADID;
+ table->type_id = H5I_BADID;
+
/* Open the dataset */
if((table->dset_id = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
goto out;