From 5eea3214334850214a2c76f1805f00538d4f4e42 Mon Sep 17 00:00:00 2001 From: HDF Rational Date: Mon, 22 Jan 2001 13:32:01 -0500 Subject: [svn-r3319] Purpose: Bug Fix Description: Generic property code was leaking memory when removing a property from a property list class in certain situations. Solution: Remove property correctly from class in all situations. Platforms tested: Solaris 2.7 (arabica) --- src/H5P.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/H5P.c b/src/H5P.c index 6496363..ba3162e 100644 --- a/src/H5P.c +++ b/src/H5P.c @@ -6914,8 +6914,12 @@ static herr_t H5P_unregister(H5P_genclass_t *pclass, const char *name) /* Remove property from property list */ /* Check if the property being removed is at the head of the list for a hash location */ - if(prop==pclass->props[loc]) + if(prop==pclass->props[loc]) { pclass->props[loc]=prop->next; + + /* Free the property, ignoring return value, nothing we can do */ + H5P_free_prop(prop); + } /* end if */ else { /* Set up initial pointers */ prev=tprop=pclass->props[loc]; -- cgit v0.12