浏览代码

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 年之前
父节点
当前提交
a9b0d43102
共有 1 个文件被更改,包括 5 次插入0 次删除
  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");