fix uninitialized ndn bug

This commit is contained in:
Kurt Zeilenga 2000-04-12 01:09:36 +00:00
parent 21431725fc
commit 360c56a78a
3 changed files with 6 additions and 6 deletions

View File

@ -31,7 +31,7 @@ do_delete(
Operation *op
)
{
char *dn, *ndn, *text;
char *dn, *ndn = NULL, *text;
Backend *be;
int rc;
@ -133,7 +133,7 @@ do_delete(
NULL, "Function not implemented", NULL, NULL );
}
cleanup:
free( ndn );
if( ndn != NULL ) free( ndn );
free( dn );
return rc;
}

View File

@ -37,7 +37,7 @@ do_modify(
Operation *op
)
{
char *dn, *ndn;
char *dn, *ndn = NULL;
char *last;
ber_tag_t tag;
ber_len_t len;
@ -274,7 +274,7 @@ do_modify(
cleanup:
free( dn );
free( ndn );
if( ndn != NULL ) free( ndn );
if ( modlist != NULL )
slap_modlist_free( modlist );
if ( mods != NULL )

View File

@ -44,7 +44,7 @@ do_modrdn(
Operation *op
)
{
char *dn, *ndn, *newrdn;
char *dn, *ndn = NULL, *newrdn;
ber_int_t deloldrdn;
Backend *be;
/* Vars for LDAP v3 newSuperior support */
@ -245,7 +245,7 @@ do_modrdn(
cleanup:
free( dn );
free( ndn );
if( ndn != NULL ) free( ndn );
free( newrdn );
if ( newSuperior != NULL )
free( newSuperior );