From 9bf48714b223b0921c9456d10716fe9727025549 Mon Sep 17 00:00:00 2001 From: Noriko Hosoi Date: Thu, 8 Jan 2009 23:11:43 +0000 Subject: Resolves: #436830 Summary: Memory leak in ns-slapd's Class Of Service Fix Description: When all the necessary values for the template cache are not available, the allocated memory should be discarded. One of them pCosPriority was missed to release. --- ldap/servers/plugins/cos/cos_cache.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'ldap/servers/plugins/cos/cos_cache.c') diff --git a/ldap/servers/plugins/cos/cos_cache.c b/ldap/servers/plugins/cos/cos_cache.c index aa042670..29a0d0d7 100644 --- a/ldap/servers/plugins/cos/cos_cache.c +++ b/ldap/servers/plugins/cos/cos_cache.c @@ -1190,7 +1190,7 @@ static int cos_dn_tmpl_entries_cb (Slapi_Entry* e, void *callback_data) { { while(dnVals[valIndex]) { - if(dnVals[valIndex]->bv_val) + if(dnVals[valIndex]->bv_val) cos_cache_add_attrval(pSneakyVal, dnVals[valIndex]->bv_val); @@ -1269,6 +1269,8 @@ static int cos_dn_tmpl_entries_cb (Slapi_Entry* e, void *callback_data) { cos_cache_del_attrval_list(&pDn); if(pAttributes) cos_cache_del_attr_list(&pAttributes); + if(pCosPriority) + cos_cache_del_attrval_list(&pCosPriority); } } /* -- cgit