diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 1997-09-18 14:54:22 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 1997-09-18 14:54:22 (GMT) |
commit | ac0b9746301f65396ecada7704cc836d2a69c30c (patch) | |
tree | 5cd530ba58bc4d12e4595a86b799595164025abf /src/H5D.c | |
parent | 0b52a1324e8f9736ce5b4686cbec14d6102abbc9 (diff) | |
download | hdf5-ac0b9746301f65396ecada7704cc836d2a69c30c.zip hdf5-ac0b9746301f65396ecada7704cc836d2a69c30c.tar.gz hdf5-ac0b9746301f65396ecada7704cc836d2a69c30c.tar.bz2 |
[svn-r95] Tracked down memory bug.
Diffstat (limited to 'src/H5D.c')
-rw-r--r-- | src/H5D.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -190,8 +190,10 @@ hatom_t H5D_find_name(hatom_t grp_id, hobjtype_t type, const char *name) HGOTO_ERROR(H5E_DATASET, H5E_NOTFOUND, FAIL); /* Get the dataset's type (currently only atomic types) */ - if (NULL==(dset->type=H5O_read (dset->file, dset->ent.header, &(dset->ent), - H5O_SIM_DTYPE, 0, NULL))) + if((dset->type=HDmalloc(sizeof(h5_datatype_t)))==NULL) + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL); + if (NULL==H5O_read (dset->file, dset->ent.header, &(dset->ent), + H5O_SIM_DTYPE, 0, dset->type)) HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL); /* Get the dataset's dimensionality (currently only simple dataspaces) */ |