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.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c
index 05ec369..cfeaaef 100644
--- a/tools/h5dump/h5dump.c
+++ b/tools/h5dump/h5dump.c
@@ -4560,7 +4560,7 @@ error:
if (hand) {
free_handler(hand, argc);
hand = NULL;
-}
+ }
h5tools_setstatus(EXIT_FAILURE);
return hand;
@@ -4630,7 +4630,6 @@ main(int argc, const char *argv[])
/* Initialize h5tools lib */
h5tools_init();
if((hand = parse_command_line(argc, argv))==NULL) {
- h5tools_setstatus(EXIT_FAILURE);
goto done;
}
@@ -4834,14 +4833,17 @@ done:
/* Free tables for objects */
table_list_free();
- if (H5Fclose(fid) < 0)
- h5tools_setstatus(EXIT_FAILURE);
-
- if(hand)
- free_handler(hand, argc);
+ if(hand)
+ free_handler(hand, argc);
- HDfree(prefix);
- HDfree(fname);
+ if(fid >=0)
+ if (H5Fclose(fid) < 0)
+ h5tools_setstatus(EXIT_FAILURE);
+
+ if(prefix)
+ HDfree(prefix);
+ if(fname)
+ HDfree(fname);
/* To Do: clean up XML table */