From: Hallvard Furuseth Date: Fri, 3 Sep 1999 20:25:58 +0000 (+0000) Subject: Remove incorrect use of entry X-Git-Tag: TWEB_OL_BASE~30 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=dc6754c7817f508f70b320a8da40ead6395de104;p=openldap Remove incorrect use of entry --- diff --git a/servers/slapd/back-ldbm/delete.c b/servers/slapd/back-ldbm/delete.c index ae5c513c26..c02e22c845 100644 --- a/servers/slapd/back-ldbm/delete.c +++ b/servers/slapd/back-ldbm/delete.c @@ -24,7 +24,7 @@ ldbm_back_delete( ) { struct ldbminfo *li = (struct ldbminfo *) be->be_private; - Entry *matched = NULL; + Entry *matched; char *pdn = NULL; Entry *e, *p = NULL; int rootlock = 0; @@ -104,7 +104,7 @@ ldbm_back_delete( /* delete from parent's id2children entry */ if( (pdn = dn_parent( be, e->e_ndn )) != NULL ) { - if( (p = dn2entry_w( be, pdn, &matched )) == NULL) { + if( (p = dn2entry_w( be, pdn, NULL )) == NULL) { Debug( LDAP_DEBUG_TRACE, "<=- ldbm_back_delete: parent does not exist\n", 0, 0, 0); @@ -180,7 +180,5 @@ return_results:; /* free entry and writer lock */ cache_return_entry_w( &li->li_cache, e ); - if ( matched != NULL ) free(matched); - return rc; } diff --git a/servers/slapd/back-ldbm/modrdn.c b/servers/slapd/back-ldbm/modrdn.c index 2d00436cda..f01fea3d3a 100644 --- a/servers/slapd/back-ldbm/modrdn.c +++ b/servers/slapd/back-ldbm/modrdn.c @@ -46,7 +46,7 @@ ldbm_back_modrdn( char *p_dn = NULL, *p_ndn = NULL; char *new_dn = NULL, *new_ndn = NULL; Entry *e, *p = NULL; - Entry *matched = NULL; + Entry *matched; int rootlock = 0; int rc = -1; /* Added to support LDAP v2 correctly (deleteoldrdn thing) */ @@ -133,7 +133,7 @@ ldbm_back_modrdn( * children. */ - if( (p = dn2entry_w( be, p_ndn, &matched )) == NULL) { + if( (p = dn2entry_w( be, p_ndn, NULL )) == NULL) { Debug( LDAP_DEBUG_TRACE, "parent does not exist\n", 0, 0, 0); send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR, @@ -195,7 +195,7 @@ ldbm_back_modrdn( /* newSuperior == entry being moved?, if so ==> ERROR */ /* Get Entry with dn=newSuperior. Does newSuperior exist? */ - if( (np = dn2entry_w( be, np_ndn, &matched )) == NULL) { + if( (np = dn2entry_w( be, np_ndn, NULL )) == NULL) { Debug( LDAP_DEBUG_TRACE, "ldbm_back_modrdn: newSup(ndn=%s) not here!\n", np_ndn, 0, 0); @@ -482,8 +482,6 @@ return_results: if( p_dn != NULL ) free( p_dn ); if( p_ndn != NULL ) free( p_ndn ); - if( matched != NULL ) free( matched ); - /* LDAP v2 supporting correct attribute handling. */ if( new_rdn_type != NULL ) free(new_rdn_type); if( new_rdn_val != NULL ) free(new_rdn_val);