소스 검색

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");