]> git.sur5r.net Git - openldap/commitdiff
Fix cache consistency problems on txn retry
authorHoward Chu <hyc@openldap.org>
Wed, 12 Mar 2003 15:20:51 +0000 (15:20 +0000)
committerHoward Chu <hyc@openldap.org>
Wed, 12 Mar 2003 15:20:51 +0000 (15:20 +0000)
servers/slapd/back-bdb/modrdn.c

index debf35832f0a73d9697c1748665cf682fbd533cd..7365a2d6551412839a2e3edfec0f26922e9308b1 100644 (file)
@@ -82,12 +82,15 @@ retry:      /* transaction retry */
                if (e != NULL) {
                        bdb_cache_delete_entry(&bdb->bi_cache, e);
                        bdb_unlocked_cache_return_entry_w(&bdb->bi_cache, e);
+                       e = NULL;
                }
                if (p != NULL) {
                        bdb_unlocked_cache_return_entry_r(&bdb->bi_cache, p);
+                       p = NULL;
                }
                if (np != NULL) {
                        bdb_unlocked_cache_return_entry_r(&bdb->bi_cache, np);
+                       np = NULL;
                }
 #ifdef NEW_LOGGING
                LDAP_LOG ( OPERATION, DETAIL1, "==>bdb_modrdn: retrying...\n", 0, 0, 0);