]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/ava.c
More system schema checks
[openldap] / servers / slapd / ava.c
index 0864a9b9c5a6d37d689712ac005503b1ee033343..c9c2c1fee9bf9e95a9e22daf1a09dbe8f96f1c0c 100644 (file)
@@ -1,6 +1,6 @@
 /* $OpenLDAP$ */
 /*
- * Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved.
+ * Copyright 1998-2002 The OpenLDAP Foundation, All Rights Reserved.
  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
  */
 /* ava.c - routines for dealing with attribute value assertions */
@@ -39,7 +39,7 @@ get_ava(
        struct berval type, value;
        AttributeAssertion *aa;
 
-       rc = ber_scanf( ber, "{oo}", &type, &value );
+       rc = ber_scanf( ber, "{mm}", &type, &value );
 
        if( rc == LBER_ERROR ) {
 #ifdef NEW_LOGGING
@@ -57,16 +57,13 @@ get_ava(
        aa->aa_value.bv_val = NULL;
 
        rc = slap_bv2ad( &type, &aa->aa_desc, text );
-       ch_free( type.bv_val );
 
        if( rc != LDAP_SUCCESS ) {
-               ch_free( value.bv_val );
                ch_free( aa );
                return rc;
        }
 
        rc = value_normalize( aa->aa_desc, usage, &value, &aa->aa_value, text );
-       ch_free( value.bv_val );
 
        if( rc != LDAP_SUCCESS ) {
                ch_free( aa );