Commit 0c9c90a3 authored by Howard Chu's avatar Howard Chu
Browse files

ITS#3365 - fix leaking bdb locks when evaluating dynamic groups

parent e7ec96fc
......@@ -1329,10 +1329,15 @@ backend_group(
Filter *filter;
Entry *user;
Backend *b2 = op->o_bd;
void *o_private = op->o_private;
if ( target && dn_match( &target->e_nname, op_ndn ) ) {
user = target;
} else {
/* back-bdb stored lockinfo here, we saved it
* above. Clear it out so that a new lock can be used.
*/
op->o_private = NULL;
op->o_bd = select_backend( op_ndn, 0, 0 );
rc = be_entry_get_rw(op, op_ndn, NULL, NULL, 0, &user );
}
......@@ -1397,6 +1402,8 @@ loopit:
}
if ( user != target ) {
be_entry_release_r( op, user );
/* restore previous lockinfo, if any */
op->o_private = o_private;
}
}
op->o_bd = b2;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment