]> git.sur5r.net Git - openldap/commitdiff
ITS#6310 dup entry before adding to cache
authorHoward Chu <hyc@openldap.org>
Sat, 24 Oct 2009 05:59:39 +0000 (05:59 +0000)
committerHoward Chu <hyc@openldap.org>
Sat, 24 Oct 2009 05:59:39 +0000 (05:59 +0000)
servers/slapd/overlays/pcache.c

index 309a192771ae367fbc8e2f9bc2056fe7b0f50a96..bfd1cd30db6fbe9a863756cb9e9eadfa907cdce9 100644 (file)
@@ -836,6 +836,7 @@ merge_entry(
 
        slap_callback cb = { NULL, slap_null_cb, NULL, NULL };
 
+       e = entry_dup( e );
        attr = e->e_attrs;
        e->e_attrs = NULL;
 
@@ -877,7 +878,7 @@ merge_entry(
                }
        } else {
                if ( op->ora_e == e )
-                       be_entry_release_w( op, e );
+                       entry_free( e );
                rc = 1;
        }