From: Pierangelo Masarati Date: Thu, 21 Nov 2002 00:31:36 +0000 (+0000) Subject: fix possible uninitialized use of nmods X-Git-Tag: NO_SLAP_OP_BLOCKS~792 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=0f17b4f852ce45f517ac86f6866ce39a62476fdb;p=openldap fix possible uninitialized use of nmods --- diff --git a/servers/slapd/mods.c b/servers/slapd/mods.c index 9af70141e2..4b1166d284 100644 --- a/servers/slapd/mods.c +++ b/servers/slapd/mods.c @@ -29,7 +29,7 @@ modify_check_duplicates( { int i, j, numvals = 0, nummods, rc = LDAP_SUCCESS; - BerVarray nvals = NULL, nmods; + BerVarray nvals = NULL, nmods = NULL; /* * FIXME: better do the following @@ -109,7 +109,7 @@ modify_check_duplicates( * then to other already normalized values */ nmods = SLAP_CALLOC( nummods + 1, sizeof( struct berval ) ); - if( nmods == NULL ) { + if ( nmods == NULL ) { #ifdef NEW_LOGGING LDAP_LOG( OPERATION, ERR, "modify_check_duplicates: SLAP_CALLOC failed", 0, 0, 0 ); @@ -117,7 +117,7 @@ modify_check_duplicates( Debug( LDAP_DEBUG_ANY, "modify_check_duplicates: SLAP_CALLOC failed", 0, 0, 0 ); #endif - goto return_results; + goto return_results; } for ( i = 0; mods[ i ].bv_val != NULL; i++ ) {