summaryrefslogtreecommitdiffstats
path: root/src/H5R.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5R.c')
-rw-r--r--src/H5R.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/H5R.c b/src/H5R.c
index 7ae5e33..30b44ac 100644
--- a/src/H5R.c
+++ b/src/H5R.c
@@ -535,6 +535,10 @@ H5Rdereference2(hid_t obj_id, hid_t oapl_id, H5R_type_t ref_type, const void *_r
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to open object")
done:
+ if (NULL != location) {
+ free (location);
+ location = NULL;
+ }
FUNC_LEAVE_API(ret_value)
} /* end H5Rdereference2() */