summaryrefslogtreecommitdiffstats
path: root/src/H5S.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5S.c')
-rw-r--r--src/H5S.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/H5S.c b/src/H5S.c
index c723127..2d1b9db 100644
--- a/src/H5S.c
+++ b/src/H5S.c
@@ -565,6 +565,10 @@ H5S_copy(const H5S_t *src, hbool_t share_selection, hbool_t copy_max)
ret_value = dst;
done:
+ if(NULL == ret_value)
+ if(dst)
+ dst = H5FL_FREE(H5S_t, dst);
+
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S_copy() */