From: Ralf Haferkamp Date: Mon, 19 Nov 2012 13:32:50 +0000 (+0100) Subject: Fixed insertion of the overlay_remove callback (SLAP_CONFIG_DELETE) X-Git-Tag: OPENLDAP_REL_ENG_2_4_34~117 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=5164359c655b1f69a48e2b694dcd62ea0ef6e65c;p=openldap Fixed insertion of the overlay_remove callback (SLAP_CONFIG_DELETE) --- diff --git a/servers/slapd/backover.c b/servers/slapd/backover.c index 320b3385c0..8a7e1ed993 100644 --- a/servers/slapd/backover.c +++ b/servers/slapd/backover.c @@ -1214,8 +1214,12 @@ overlay_remove( BackendDB *be, slap_overinst *on, Operation *op ) rm_cb->sc_private = (void*) rm_ctx; /* Append callback to the end of the list */ - for ( cb = op->o_callback; cb->sc_next; cb = cb->sc_next ); - cb->sc_next = rm_cb; + if ( !op->o_callback ) { + op->o_callback = rm_cb; + } else { + for ( cb = op->o_callback; cb->sc_next; cb = cb->sc_next ); + cb->sc_next = rm_cb; + } } #endif /* SLAP_CONFIG_DELETE */