From 657e7cfbe699b254ace0aa884e70c4d9e81dcefc Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Mon, 12 Jul 2010 23:10:29 -0500 Subject: 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 prot_thread_main(). --- ldap/servers/plugins/replication/repl5_protocol.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ldap/servers/plugins/replication/repl5_protocol.c b/ldap/servers/plugins/replication/repl5_protocol.c index acd3c98a..0f4d1fa7 100644 --- a/ldap/servers/plugins/replication/repl5_protocol.c +++ b/ldap/servers/plugins/replication/repl5_protocol.c @@ -292,10 +292,13 @@ prot_thread_main(void *arg) PR_ASSERT(NULL != rp); agmt = rp->agmt; - if (agmt) { - set_thread_private_agmtname (agmt_get_long_name(agmt)); + if (!agmt) { + slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "missing replication agreement\n"); + return; } + set_thread_private_agmtname (agmt_get_long_name(agmt)); + done = 0; while (!done) -- cgit