From daeb159cb858cb4da82d5d8874388105c163ec3a Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Sat, 11 Nov 2000 17:22:12 -0500 Subject: [svn-r2869] Purpose: Bug fix Description: "old-style" compound datatypes with array fields were leaking memory during the datatype header decoding when creating the array datatype for a field. Solution: Free the base type of the array after creating array datatype for field. Platforms tested: Solaris 2.6 (baldric) --- src/H5Odtype.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/H5Odtype.c b/src/H5Odtype.c index a0cfa49..6d77194 100644 --- a/src/H5Odtype.c +++ b/src/H5Odtype.c @@ -267,6 +267,9 @@ H5O_dtype_decode_helper(H5F_t *f, const uint8_t **pp, H5T_t *dt) H5MM_xfree(dt->u.compnd.memb); HRETURN_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL, "unable to create array datatype"); } + + /* Close the base type for the array */ + H5T_close(temp_type); /* Make the array type the type that is set for the field */ temp_type=array_dt; -- cgit v0.12