From: Kurt Zeilenga Date: Wed, 12 Apr 2000 01:09:36 +0000 (+0000) Subject: fix uninitialized ndn bug X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~3107 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=360c56a78a40fbf45a87013859eeef9960c34f74;p=openldap fix uninitialized ndn bug --- diff --git a/servers/slapd/delete.c b/servers/slapd/delete.c index 79582c3300..5b9b996536 100644 --- a/servers/slapd/delete.c +++ b/servers/slapd/delete.c @@ -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; } diff --git a/servers/slapd/modify.c b/servers/slapd/modify.c index 9c849cdcae..87ae7a13fb 100644 --- a/servers/slapd/modify.c +++ b/servers/slapd/modify.c @@ -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 ) diff --git a/servers/slapd/modrdn.c b/servers/slapd/modrdn.c index 673af6881e..0bf65de0fd 100644 --- a/servers/slapd/modrdn.c +++ b/servers/slapd/modrdn.c @@ -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 );