summaryrefslogtreecommitdiffstats
path: root/tools/h5dump/h5dump.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/h5dump/h5dump.c')
-rw-r--r--tools/h5dump/h5dump.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c
index a437619..abe97ea 100644
--- a/tools/h5dump/h5dump.c
+++ b/tools/h5dump/h5dump.c
@@ -5749,7 +5749,6 @@ xml_dump_group(hid_t gid, const char *name)
char type_name[1024], *tmp = NULL;
char *par = NULL;
int isRoot = 0;
- char *ptrstr;
char *t_objname;
char *par_name;
unsigned crt_order_flags;
@@ -5802,6 +5801,7 @@ xml_dump_group(hid_t gid, const char *name)
indent += COL;
H5Oget_info(gid, &oinfo);
+
if(oinfo.rc > 1) {
obj_t *found_obj; /* Found object */
@@ -5819,6 +5819,8 @@ xml_dump_group(hid_t gid, const char *name)
char *parentxid = malloc(100);
if(found_obj->displayed) {
+ char *ptrstr = malloc(100);
+
/* already seen: enter a groupptr */
if(isRoot) {
/* probably can't happen! */
@@ -5839,7 +5841,6 @@ xml_dump_group(hid_t gid, const char *name)
}
indentation(indent + COL);
- ptrstr = malloc(100);
t_objname = xml_escape_the_name(found_obj->objname);/* point to the NDT by name */
par_name = xml_escape_the_name(par);
xml_name_to_XID(found_obj->objname, ptrstr, 100, 1);
@@ -5850,6 +5851,7 @@ xml_dump_group(hid_t gid, const char *name)
ptrstr, t_objname, parentxid, par_name);
free(t_objname);
free(par_name);
+ free(ptrstr);
} else {
/* first time this group has been seen -- describe it */