ldap/servers/plugins/cos/cos_cache.c | 2 ++
1 file changed, 2 insertions(+)
New commits:
commit 5237b2151b6bdff8a39a9d9ff9fc2a2013fb51ab
Author: Mark Reynolds <mreynolds(a)redhat.com>
Date: Tue Dec 2 13:38:06 2014 -0500
Ticket 47969 - COS memory leak when rebuilding the cache
Bug Description: When the COS cache is released, not all of the schema
objectclasses are freed. So every time we rebuild the
COS cache we leak memory.
Fix Description: After we free the schema attributes, the very first
attribute still needs to be freed. It is not freed
initially because of the duplicate checking logic, so
it is now done after the loop.
https://fedorahosted.org/389/ticket/47969
Reviewed by: nhosoi(Thanks!)
(cherry picked from commit d2dfda95c543f106443f898436151b00c68e4270)
diff --git a/ldap/servers/plugins/cos/cos_cache.c b/ldap/servers/plugins/cos/cos_cache.c
index e3f808d..1174ed1 100644
--- a/ldap/servers/plugins/cos/cos_cache.c
+++ b/ldap/servers/plugins/cos/cos_cache.c
@@ -1864,6 +1864,8 @@ static void cos_cache_del_schema(cosCache *pCache)
}
}
}
+ /* Finally, remove the first attribute's objectclass list */
+ cos_cache_del_attrval_list(&(pCache->ppAttrIndex[0]->pObjectclasses));
LDAPDebug( LDAP_DEBUG_TRACE, "<-- cos_cache_del_schema\n",0,0,0);
}