From 65100aa371af1ae14fedd282c928615a307a8e57 Mon Sep 17 00:00:00 2001
From: Scot Breitenfeld <brtnfld@hdfgroup.org>
Date: Thu, 26 Jul 2012 22:18:03 -0500
Subject: [svn-r22611] Fixed: HDFFV-8013  H5LTget_attribute_string appears to
 not close an object identifier

Tested: gnu and intel (jam)
---
 hl/src/H5LT.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/hl/src/H5LT.c b/hl/src/H5LT.c
index 678642f..eed2721 100644
--- a/hl/src/H5LT.c
+++ b/hl/src/H5LT.c
@@ -3024,8 +3024,11 @@ herr_t H5LTget_attribute_string( hid_t loc_id,
         return -1;
 
     /* Get the attribute */
-    if ( H5LT_get_attribute_disk( obj_id, attr_name, data ) < 0 )
-        return -1;
+    if ( H5LT_get_attribute_disk( obj_id, attr_name, data ) < 0 ) 
+    {
+      H5Oclose(obj_id); 
+      return -1;
+    }
 
     /* Close the object */
     if(H5Oclose(obj_id) < 0)
@@ -3458,6 +3461,8 @@ static herr_t H5LT_get_attribute_mem(hid_t loc_id,
     return 0;
 
 out:
+    if(obj_id > 0)
+        H5Oclose(obj_id);
     if(attr_id > 0)
         H5Aclose(attr_id);
     return -1;
-- 
cgit v0.12