From: Luke Howard Date: Tue, 21 Jan 2003 15:24:28 +0000 (+0000) Subject: Ensure AttributeDescriptions are initialized to NULL before calling slap_str2ad() X-Git-Tag: NO_SLAP_OP_BLOCKS~554 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e26749d76bd26c9fecf1a17b467525813e48f9e7;p=openldap Ensure AttributeDescriptions are initialized to NULL before calling slap_str2ad() --- diff --git a/servers/slapd/slapi/slapi_utils.c b/servers/slapd/slapi/slapi_utils.c index a69df2109e..9c9c7b8456 100644 --- a/servers/slapd/slapi/slapi_utils.c +++ b/servers/slapd/slapi/slapi_utils.c @@ -192,7 +192,7 @@ slapi_entry_attr_delete( char *type ) { #if defined(LDAP_SLAPI) - AttributeDescription *ad; + AttributeDescription *ad = NULL; const char *text; if ( slap_str2ad( type, &ad, &text ) != LDAP_SUCCESS ) { @@ -234,7 +234,7 @@ slapi_entry_attr_merge( struct berval **vals ) { #if defined(LDAP_SLAPI) - AttributeDescription *ad; + AttributeDescription *ad = NULL; const char *text; BerVarray bv; int rc; @@ -265,7 +265,7 @@ slapi_entry_attr_find( Slapi_Attr **attr ) { #if defined(LDAP_SLAPI) - AttributeDescription *ad; + AttributeDescription *ad = NULL; const char *text; int rc; @@ -1415,7 +1415,7 @@ Slapi_Attr *slapi_attr_init( Slapi_Attr *a, const char *type ) { #ifdef LDAP_SLAPI const char *text; - AttributeDescription *ad; + AttributeDescription *ad = NULL; if( slap_str2ad( type, &ad, &text ) != LDAP_SUCCESS ) { return NULL; @@ -1542,8 +1542,8 @@ int slapi_attr_value_find( const Slapi_Attr *a, struct berval *v ) int slapi_attr_type_cmp( const char *t1, const char *t2, int opt ) { #ifdef LDAP_SLAPI - AttributeDescription *a1; - AttributeDescription *a2; + AttributeDescription *a1 = NULL; + AttributeDescription *a2 = NULL; const char *text; int ret; @@ -1641,7 +1641,7 @@ int slapi_attr_get_bervals_copy( Slapi_Attr *a, struct berval ***vals ) char *slapi_attr_syntax_normalize( const char *s ) { #ifdef LDAP_SLAPI - AttributeDescription *ad; + AttributeDescription *ad = NULL; const char *text; if ( slap_str2ad( s, &ad, &text ) != LDAP_SUCCESS ) { @@ -2164,7 +2164,7 @@ int slapi_x_attrset_add_attr_copy( Slapi_AttrSet *as, Slapi_Attr *a ) int slapi_x_attrset_find( Slapi_AttrSet *as, const char *type, Slapi_Attr **attr ) { #ifdef LDAP_SLAPI - AttributeDescription *ad; + AttributeDescription *ad = NULL; const char *text; if ( as == NULL || *as == NULL ) { @@ -2184,7 +2184,7 @@ int slapi_x_attrset_find( Slapi_AttrSet *as, const char *type, Slapi_Attr **attr int slapi_x_attrset_merge( Slapi_AttrSet *as, const char *type, Slapi_ValueSet *vals ) { #ifdef LDAP_SLAPI - AttributeDescription *ad; + AttributeDescription *ad = NULL; Slapi_AttrSet *a; const char *text; @@ -2238,7 +2238,7 @@ int slapi_x_attrset_merge_bervals( Slapi_AttrSet *as, const char *type, struct b int slapi_x_attrset_delete( Slapi_AttrSet *as, const char *type ) { #ifdef LDAP_SLAPI - AttributeDescription *ad; + AttributeDescription *ad = NULL; const char *text; if ( as == NULL ) {