]> git.sur5r.net Git - openldap/commitdiff
ITS#3596 partial fix - fix sc_cleanup processing
authorHoward Chu <hyc@openldap.org>
Mon, 14 Mar 2005 00:39:49 +0000 (00:39 +0000)
committerHoward Chu <hyc@openldap.org>
Mon, 14 Mar 2005 00:39:49 +0000 (00:39 +0000)
servers/slapd/result.c

index c2efc492fd8dc75a0f76a1f7872098e3451c280a..45e399d18993b415d15519521b2970665e9f20e3 100644 (file)
@@ -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;