diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2005-07-17 02:47:26 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2005-07-17 02:47:26 (GMT) |
commit | 9cd32352ad91f881d243734c925a62aaf47e987a (patch) | |
tree | ca1df43a4b3670ab6da919da9f2fe12c3f477fb7 /src/H5Odtype.c | |
parent | 86925daca58cc037b3c0b943b203b0b00d548d51 (diff) | |
download | hdf5-9cd32352ad91f881d243734c925a62aaf47e987a.zip hdf5-9cd32352ad91f881d243734c925a62aaf47e987a.tar.gz hdf5-9cd32352ad91f881d243734c925a62aaf47e987a.tar.bz2 |
[svn-r11079] Purpose:
Bug fix
Description:
Correct memory leak when a dataset is attempted to be opened, but turns
out to be a group or named datatype.
Also, clean up code that was leading to the leak and zero out empty
group entries to help prevent similar errors in the future.
Platforms tested:
FreebSD 4.11 (sleipnir)
Too minor to require h5committest
Diffstat (limited to 'src/H5Odtype.c')
-rw-r--r-- | src/H5Odtype.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/H5Odtype.c b/src/H5Odtype.c index 604bbb0..ed044c4 100644 --- a/src/H5Odtype.c +++ b/src/H5Odtype.c @@ -1173,12 +1173,8 @@ H5O_dtype_set_share (H5F_t UNUSED *f, void *_mesg/*in,out*/, assert (sh); assert (!sh->in_gh); - /* Shallow copy the symbol table entry */ - H5G_ent_copy(&(dt->ent),&(sh->u.ent),H5G_COPY_SHALLOW); - - /* Reset the names of the copied symbol table entry */ - dt->ent.user_path_r = NULL; - dt->ent.canon_path_r = NULL; + /* NULL copy here, names not appropriate */ + H5G_ent_copy(&(dt->ent),&(sh->u.ent),H5G_COPY_NULL); /* Note that the datatype is a named datatype */ dt->shared->state = H5T_STATE_NAMED; |