]> git.sur5r.net Git - openldap/commitdiff
Remove incorrect use of <matched> entry
authorHallvard Furuseth <hallvard@openldap.org>
Fri, 3 Sep 1999 20:25:58 +0000 (20:25 +0000)
committerHallvard Furuseth <hallvard@openldap.org>
Fri, 3 Sep 1999 20:25:58 +0000 (20:25 +0000)
servers/slapd/back-ldbm/delete.c
servers/slapd/back-ldbm/modrdn.c

index ae5c513c2694b23892d2b0810fab51fd913d397f..c02e22c84500801dbb6633004a5b8766db885009 100644 (file)
@@ -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;
 }
index 2d00436cdaf93406e1be25dcf452d1d941a2f8ce..f01fea3d3a3b1287965f185ea3f53a934d38ba64 100644 (file)
@@ -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);