reset o_next pointer before freeing the operation (otherwise an assertion

failure in slap_op_free is possible)
This commit is contained in:
Ralf Haferkamp 2004-07-02 14:57:35 +00:00
parent 356d862974
commit 3286e13a2c
2 changed files with 2 additions and 0 deletions

View file

@ -103,6 +103,7 @@ do_abandon( Operation *op, SlapReply *rs )
if ( o->o_msgid == id ) {
LDAP_STAILQ_REMOVE( &op->o_conn->c_pending_ops,
o, slap_op, o_next );
LDAP_STAILQ_NEXT(o, o_next) = NULL;
op->o_conn->c_n_ops_pending--;
slap_op_free( o );
goto done;

View file

@ -66,6 +66,7 @@ int cancel_extop( Operation *op, SlapReply *rs )
LDAP_STAILQ_FOREACH( o, &op->o_conn->c_pending_ops, o_next ) {
if ( o->o_msgid == opid ) {
LDAP_STAILQ_REMOVE( &op->o_conn->c_pending_ops, o, slap_op, o_next );
LDAP_STAILQ_NEXT(o, o_next) = NULL;
op->o_conn->c_n_ops_pending--;
slap_op_free( o );
found = 1;