From 3286e13a2c2ce0eece83f8049d96236af574fda4 Mon Sep 17 00:00:00 2001 From: Ralf Haferkamp Date: Fri, 2 Jul 2004 14:57:35 +0000 Subject: [PATCH] reset o_next pointer before freeing the operation (otherwise an assertion failure in slap_op_free is possible) --- servers/slapd/abandon.c | 1 + servers/slapd/cancel.c | 1 + 2 files changed, 2 insertions(+) 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; -- 2.39.5