58624c0
Source: cvs diff -u -r 1.41.2.20 -r 1.41.2.21 pcache.c
58624c0
Index: pcache.c
58624c0
===================================================================
58624c0
RCS file: /repo/OpenLDAP/pkg/ldap/servers/slapd/overlays/pcache.c,v
58624c0
retrieving revision 1.41.2.20
58624c0
retrieving revision 1.41.2.21
58624c0
diff -u -r1.41.2.20 -r1.41.2.21
58624c0
--- servers/slapd/overlays/pcache.c	28 Aug 2007 09:21:34 -0000	1.41.2.20
58624c0
+++ servers/slapd/overlays/pcache.c	2 Oct 2007 16:24:09 -0000	1.41.2.21
58624c0
@@ -1134,8 +1134,8 @@
58624c0
 		count++;
58624c0
 	}
58624c0
 
58624c0
-	*new_attrs = (AttributeName*)ch_malloc((count+1)*
58624c0
-		sizeof(AttributeName));
58624c0
+	*new_attrs = (AttributeName*)ch_calloc( count + 1,
58624c0
+		sizeof(AttributeName) );
58624c0
 	for (i=0; i<attrs->count; i++) {
58624c0
 		(*new_attrs)[i].an_name = attrs->attrs[i].an_name;
58624c0
 		(*new_attrs)[i].an_desc = attrs->attrs[i].an_desc;
58624c0
@@ -1155,18 +1155,13 @@
58624c0
 			continue;
58624c0
 		(*new_attrs)[j].an_name = filter_attrs[i].an_name;
58624c0
 		(*new_attrs)[j].an_desc = filter_attrs[i].an_desc;
58624c0
-		(*new_attrs)[j].an_oc = NULL;
58624c0
-		(*new_attrs)[j].an_oc_exclude = 0;
58624c0
 		j++;
58624c0
 	}
58624c0
 	if ( addoc ) {
58624c0
 		(*new_attrs)[j].an_name = slap_schema.si_ad_objectClass->ad_cname;
58624c0
 		(*new_attrs)[j].an_desc = slap_schema.si_ad_objectClass;
58624c0
-		(*new_attrs)[j].an_oc = NULL;
58624c0
-		(*new_attrs)[j].an_oc_exclude = 0;
58624c0
 		j++;
58624c0
 	}
58624c0
-	BER_BVZERO( &(*new_attrs)[j].an_name );
58624c0
 }
58624c0
 
58624c0
 /* NOTE: this is a quick workaround to let pcache minimally interact