Author: nhosoi
Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/cos
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv12555
Modified Files:
cos_cache.c
Log Message:
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.
Index: cos_cache.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/cos/cos_cache.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- cos_cache.c 18 Oct 2007 00:08:28 -0000 1.9
+++ cos_cache.c 8 Jan 2009 23:11:43 -0000 1.10
@@ -1190,7 +1190,7 @@
{
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 @@
cos_cache_del_attrval_list(&pDn);
if(pAttributes)
cos_cache_del_attr_list(&pAttributes);
+ if(pCosPriority)
+ cos_cache_del_attrval_list(&pCosPriority);
}
}
/*