summaryrefslogtreecommitdiffstats
path: root/c++/src/H5EnumType.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'c++/src/H5EnumType.cpp')
-rw-r--r--c++/src/H5EnumType.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/c++/src/H5EnumType.cpp b/c++/src/H5EnumType.cpp
index 04bb9e0..a91c053 100644
--- a/c++/src/H5EnumType.cpp
+++ b/c++/src/H5EnumType.cpp
@@ -159,6 +159,7 @@ H5std_string EnumType::nameOf( void *value, size_t size ) const
// If H5Tenum_nameof returns a negative value, raise an exception,
if( ret_value < 0 )
{
+ delete []name_C;
throw DataTypeIException("EnumType::nameOf", "H5Tenum_nameof failed");
}
// otherwise, create the string to hold the datatype name and return it