summaryrefslogtreecommitdiffstats
path: root/c++/src/H5Location.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'c++/src/H5Location.cpp')
-rw-r--r--c++/src/H5Location.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/c++/src/H5Location.cpp b/c++/src/H5Location.cpp
index 89f10b5..cd733c4 100644
--- a/c++/src/H5Location.cpp
+++ b/c++/src/H5Location.cpp
@@ -554,6 +554,7 @@ H5std_string H5Location::getComment(const char* name, size_t buf_size) const
ssize_t comment_len = getComment(name, tmp_len+1, comment_C);
if (comment_len < 0)
{
+ delete []comment_C;
throw LocationException("H5Location::getComment", "H5Oget_comment_by_name failed");
}