Pārlūkot izejas kodu

Ticket 47846 - server crashes deleting a replication agreement

Bug Description:  when an agreement is deleted the ruv in
			the repl agreemnet object is cleaned.
			But if the agrrement is disabled, the
			object doesn't exist and attempt to access
			it crashes

Fix Description:   remove maxcsn only if protocol is started

https://fedorahosted.org/389/ticket/47846

Reviewed by: Rich, thanks
Ludwig Krispenz 11 gadi atpakaļ
vecāks
revīzija
a9b0d43102
1 mainītis faili ar 5 papildinājumiem un 0 dzēšanām
  1. 5 0
      ldap/servers/plugins/replication/repl5_agmt.c

+ 5 - 0
ldap/servers/plugins/replication/repl5_agmt.c

@@ -3032,6 +3032,11 @@ agmt_remove_maxcsn(Repl_Agmt *ra)
     char *attrs[2];
     int rc;
 
+    if (ra->protocol == NULL) {
+	/* nothing to do, agmt is not started */
+	return;
+    }
+
     pb = slapi_pblock_new();
     if (!pb) {
         slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "agmt_set_maxcsn: Out of memory\n");