From: Ralf Haferkamp Date: Fri, 2 Jul 2004 14:57:35 +0000 (+0000) Subject: reset o_next pointer before freeing the operation (otherwise an assertion X-Git-Tag: OPENDLAP_REL_ENG_2_2_MP~131 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=3286e13a2c2ce0eece83f8049d96236af574fda4;p=openldap reset o_next pointer before freeing the operation (otherwise an assertion failure in slap_op_free is possible) --- diff --git a/servers/slapd/abandon.c b/servers/slapd/abandon.c index bc37a00f61..d6f8181933 100644 --- a/servers/slapd/abandon.c +++ b/servers/slapd/abandon.c @@ -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; diff --git a/servers/slapd/cancel.c b/servers/slapd/cancel.c index 005dbba0b2..b1d8023e82 100644 --- a/servers/slapd/cancel.c +++ b/servers/slapd/cancel.c @@ -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;