]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/filterentry.c
Cleanup
[openldap] / servers / slapd / filterentry.c
index 93c78e75deb3a3234aaa4a6f7586032f173e1c8d..1d3f4fe885a151e8127f341536de7572979df678 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2008 The OpenLDAP Foundation.
+ * Copyright 1998-2009 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -220,7 +220,7 @@ static int test_mra_filter(
                                        num_attr_vals++;
 
                                        /* following malloced will be freed by comp_tree_free () */
-                                       a->a_comp_data = malloc( sizeof( ComponentData ) +
+                                       a->a_comp_data = SLAP_MALLOC( sizeof( ComponentData ) +
                                                sizeof( ComponentSyntaxInfo* )*num_attr_vals );
 
                                        if ( !a->a_comp_data ) return LDAP_NO_MEMORY;
@@ -546,7 +546,7 @@ test_ava_filter(
        if ( ava->aa_desc == slap_schema.si_ad_hasSubordinates 
                && op && op->o_bd && op->o_bd->be_has_subordinates )
        {
-               int     hasSubordinates;
+               int     hasSubordinates = 0;
                struct berval hs;
 
                if( type != LDAP_FILTER_EQUALITY &&
@@ -716,7 +716,7 @@ test_ava_filter(
                        num_attr_vals++;/* for NULL termination */
 
                        /* following malloced will be freed by comp_tree_free () */
-                       a->a_comp_data = malloc( sizeof( ComponentData ) + sizeof( ComponentSyntaxInfo* )*num_attr_vals );
+                       a->a_comp_data = SLAP_MALLOC( sizeof( ComponentData ) + sizeof( ComponentSyntaxInfo* )*num_attr_vals );
 
                        if ( !a->a_comp_data ) {
                                return LDAP_NO_MEMORY;