]> git.sur5r.net Git - openldap/commitdiff
ITS#7537 release entry on failure
authorRyan Tandy <ryan@nardis.ca>
Wed, 2 Sep 2015 01:56:19 +0000 (18:56 -0700)
committerRyan Tandy <ryan@nardis.ca>
Wed, 2 Sep 2015 01:56:19 +0000 (18:56 -0700)
servers/slapd/overlays/ppolicy.c

index 3a6ee17d801491cc800d1b72661d6a7bb5342e14..a0c52e11f9c1ef02640576712f7008307f4c38bc 100644 (file)
@@ -576,6 +576,12 @@ ppolicy_get( Operation *op, Entry *e, PassPolicy *pp )
        return;
 
 defaultpol:
+       if ( pe ) {
+               op->o_bd->bd_info = (BackendInfo *)on->on_info;
+               be_entry_release_r( op, pe );
+               op->o_bd->bd_info = (BackendInfo *)on;
+       }
+
        Debug( LDAP_DEBUG_TRACE,
                "ppolicy_get: using default policy\n", 0, 0, 0 );
        return;