mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-03 13:40:37 -05:00
fix possible uninitialized use of nmods
This commit is contained in:
parent
614e7d565d
commit
0f17b4f852
1 changed files with 3 additions and 3 deletions
|
|
@ -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++ ) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue