summaryrefslogtreecommitdiffstats
path: root/src/H5Osdim.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>1997-09-18 21:06:11 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>1997-09-18 21:06:11 (GMT)
commitef8604f3484a1547222ad73474e74788497d9079 (patch)
treeaf634636415858cb06d3b9f7981a54e1b0887eb2 /src/H5Osdim.c
parentac0b9746301f65396ecada7704cc836d2a69c30c (diff)
downloadhdf5-ef8604f3484a1547222ad73474e74788497d9079.zip
hdf5-ef8604f3484a1547222ad73474e74788497d9079.tar.gz
hdf5-ef8604f3484a1547222ad73474e74788497d9079.tar.bz2
[svn-r96] Added "atexit" routines to each interface to free buffers allocated during
runtime. Isolated but can't figure out how to fix bug reported with purify.
Diffstat (limited to 'src/H5Osdim.c')
-rw-r--r--src/H5Osdim.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/H5Osdim.c b/src/H5Osdim.c
index 5549fc0..80b9735 100644
--- a/src/H5Osdim.c
+++ b/src/H5Osdim.c
@@ -333,18 +333,21 @@ H5O_sim_dim_copy (const void *mesg, void *dest)
HDmemcpy(dst,src,sizeof(H5O_sim_dim_t));
if(src->rank>0)
{
- dst->size = H5MM_xcalloc (src->rank, sizeof(uint32));
+ if(dst->size==NULL)
+ dst->size = H5MM_xcalloc (src->rank, sizeof(uint32));
HDmemcpy(dst->size,src->size,src->rank*sizeof(uint32));
/* Check for maximum dimensions and copy those */
if((src->dim_flags&0x01)>0)
{
- dst->max = H5MM_xcalloc (src->rank, sizeof(uint32));
+ if(dst->max==NULL)
+ dst->max = H5MM_xcalloc (src->rank, sizeof(uint32));
HDmemcpy(dst->max,src->max,src->rank*sizeof(uint32));
} /* end if */
/* Check for dimension permutation and copy those */
if((src->dim_flags&0x02)>0)
{
- dst->perm = H5MM_xcalloc (src->rank, sizeof(uint32));
+ if(dst->max==NULL)
+ dst->perm = H5MM_xcalloc (src->rank, sizeof(uint32));
HDmemcpy(dst->perm,src->perm,src->rank*sizeof(uint32));
} /* end if */
} /* end if */