summaryrefslogtreecommitdiffstats
path: root/c++/src/H5CommonFG.cpp
diff options
context:
space:
mode:
authorVailin Choi <vchoi@hdfgroup.org>2013-08-01 17:54:31 (GMT)
committerVailin Choi <vchoi@hdfgroup.org>2013-08-01 17:54:31 (GMT)
commitb8a8b54fda077ee6fccc084de18c14ae6e7b6bfe (patch)
treed5674c723d0bbb93725b78469129a7508362745d /c++/src/H5CommonFG.cpp
parente78fbfd2a2c8e7586d9f18cfeadd2a04b336ef18 (diff)
downloadhdf5-b8a8b54fda077ee6fccc084de18c14ae6e7b6bfe.zip
hdf5-b8a8b54fda077ee6fccc084de18c14ae6e7b6bfe.tar.gz
hdf5-b8a8b54fda077ee6fccc084de18c14ae6e7b6bfe.tar.bz2
[svn-r23961] Bring revisions #23862 - 23953 from trunk to revise_chunks.
h5committested.
Diffstat (limited to 'c++/src/H5CommonFG.cpp')
-rw-r--r--c++/src/H5CommonFG.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/c++/src/H5CommonFG.cpp b/c++/src/H5CommonFG.cpp
index b3889a0..0651c29 100644
--- a/c++/src/H5CommonFG.cpp
+++ b/c++/src/H5CommonFG.cpp
@@ -568,8 +568,10 @@ H5std_string CommonFG::getComment( const char* name, size_t bufsize ) const
// if H5Oget_comment_by_name returns SUCCEED, return the string comment,
// otherwise, throw an exception
- if( ret_value < 0 )
- throwException("getComment", "H5Oget_comment_by_name failed");
+ if( ret_value < 0 ) {
+ delete []comment_C;
+ throwException("getComment", "H5Oget_comment_by_name failed");
+ }
H5std_string comment = H5std_string(comment_C);
delete []comment_C;