瀏覽代碼

Bug 614511 - fix coverify Defect Type: Null pointer dereferences issues 11846 - 11891

https://bugzilla.redhat.com/show_bug.cgi?id=614511
Resolves: bug 614511
Bug description: Fix coverify Defect Type: Null pointer dereferences issues 11846 - 11891
description: Catch possible NULL pointer in _replica_reap_tombstones().
Endi S. Dewata 15 年之前
父節點
當前提交
2eafb258f7
共有 1 個文件被更改,包括 6 次插入3 次删除
  1. 6 3
      ldap/servers/plugins/replication/repl5_replica.c

+ 6 - 3
ldap/servers/plugins/replication/repl5_replica.c

@@ -2556,9 +2556,12 @@ _replica_reap_tombstones(void *arg)
 	}
 
 done:
-	PR_Lock(replica->repl_lock);
-	replica->tombstone_reap_active = PR_FALSE;
-	PR_Unlock(replica->repl_lock);
+	if (replica)
+	{
+		PR_Lock(replica->repl_lock);
+		replica->tombstone_reap_active = PR_FALSE;
+		PR_Unlock(replica->repl_lock);
+	}
 
 	if (NULL != purge_csn)
 	{