]> git.sur5r.net Git - openldap/commitdiff
ITS#7127 fix syncrepl_config reference to freed memory
authorHoward Chu <hyc@openldap.org>
Thu, 19 Jan 2012 23:55:54 +0000 (15:55 -0800)
committerHoward Chu <hyc@openldap.org>
Thu, 19 Jan 2012 23:55:54 +0000 (15:55 -0800)
servers/slapd/syncrepl.c

index f1d543fce41b4a4b2f72e56598d20297ac03e2f0..1a074ed41c574f6a95b67355f651c28be6d1a292 100644 (file)
@@ -5512,13 +5512,13 @@ syncrepl_config( ConfigArgs *c )
                                                                ldap_pvt_runqueue_stoptask( &slapd_rq, re );
                                                                isrunning = 1;
                                                        }
-                                                       ldap_pvt_runqueue_remove( &slapd_rq, re );
-                                                       ldap_pvt_thread_mutex_unlock( &slapd_rq.rq_mutex );
-
                                                        if ( ldap_pvt_thread_pool_retract( &connection_pool,
                                                                        re->routine, re ) > 0 )
                                                                isrunning = 0;
 
+                                                       ldap_pvt_runqueue_remove( &slapd_rq, re );
+                                                       ldap_pvt_thread_mutex_unlock( &slapd_rq.rq_mutex );
+
                                                        ldap_pvt_thread_mutex_unlock( &si->si_mutex );
                                                }
                                        }