summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>1997-09-18 14:54:22 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>1997-09-18 14:54:22 (GMT)
commitac0b9746301f65396ecada7704cc836d2a69c30c (patch)
tree5cd530ba58bc4d12e4595a86b799595164025abf
parent0b52a1324e8f9736ce5b4686cbec14d6102abbc9 (diff)
downloadhdf5-ac0b9746301f65396ecada7704cc836d2a69c30c.zip
hdf5-ac0b9746301f65396ecada7704cc836d2a69c30c.tar.gz
hdf5-ac0b9746301f65396ecada7704cc836d2a69c30c.tar.bz2
[svn-r95] Tracked down memory bug.
-rw-r--r--src/H5D.c6
-rw-r--r--src/H5Osdim.c2
-rw-r--r--src/H5P.c1
3 files changed, 6 insertions, 3 deletions
diff --git a/src/H5D.c b/src/H5D.c
index 71d083d..a5a2349 100644
--- a/src/H5D.c
+++ b/src/H5D.c
@@ -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) */
diff --git a/src/H5Osdim.c b/src/H5Osdim.c
index f8d8a73..5549fc0 100644
--- a/src/H5Osdim.c
+++ b/src/H5Osdim.c
@@ -224,7 +224,7 @@ H5O_sim_dim_fast (const H5G_entry_t *ent, void *mesg)
sdim->dim_flags = 0;
sdim->size = H5MM_xmalloc (sizeof(uint32) * sdim->rank);
for (u=0; u<sdim->rank; u++) {
- sdim->size[u] = ent->cache.sdata.dim[u];
+ sdim->size[u] = ent->cache.sdata.dim[u];
}
} else {
sdim = NULL;
diff --git a/src/H5P.c b/src/H5P.c
index 7c7bbbb..e8a5d16 100644
--- a/src/H5P.c
+++ b/src/H5P.c
@@ -449,6 +449,7 @@ herr_t H5P_release(hatom_t oid)
if(dim->s->perm!=NULL)
HDfree(dim->s->perm);
HDfree(dim->s);
+ dim->s=NULL;
} /* end if */
} /* end if */
HDfree(dim);