From: Howard Chu Date: Mon, 14 Mar 2005 00:39:49 +0000 (+0000) Subject: ITS#3596 partial fix - fix sc_cleanup processing X-Git-Tag: OPENLDAP_REL_ENG_2_3_BP~75 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=b508cca2177fe2225613f539b60f894443aada51;p=openldap ITS#3596 partial fix - fix sc_cleanup processing --- diff --git a/servers/slapd/result.c b/servers/slapd/result.c index c2efc492fd..45e399d189 100644 --- a/servers/slapd/result.c +++ b/servers/slapd/result.c @@ -472,8 +472,8 @@ clean2:; sc_next = op->o_callback->sc_next; if ( op->o_callback->sc_cleanup ) { (void)op->o_callback->sc_cleanup( op, rs ); - if ( first && op->o_callback == NULL ) { - sc = NULL; + if ( first && op->o_callback != sc ) { + sc = op->o_callback; } } first = 0; @@ -1204,8 +1204,8 @@ error_return:; sc_next = op->o_callback->sc_next; if ( op->o_callback->sc_cleanup ) { (void)op->o_callback->sc_cleanup( op, rs ); - if ( first && op->o_callback == NULL ) { - sc = NULL; + if ( first && op->o_callback != sc ) { + sc = op->o_callback; } } first = 0; @@ -1393,8 +1393,8 @@ rel: sc_next = op->o_callback->sc_next; if ( op->o_callback->sc_cleanup ) { (void)op->o_callback->sc_cleanup( op, rs ); - if ( first && op->o_callback == NULL ) { - sc = NULL; + if ( first && op->o_callback != sc ) { + sc = op->o_callback; } } first = 0;