summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2010-07-12 23:10:29 -0500
committerNoriko Hosoi <nhosoi@redhat.com>2010-08-19 13:01:29 -0700
commit657e7cfbe699b254ace0aa884e70c4d9e81dcefc (patch)
tree6365204a859e95e787c7cad43d25c6b3e9a8a1c1
parent2aae0e55cf261c428292d391fd885d31e3de041a (diff)
downloadds-657e7cfbe699b254ace0aa884e70c4d9e81dcefc.tar.gz
ds-657e7cfbe699b254ace0aa884e70c4d9e81dcefc.tar.xz
ds-657e7cfbe699b254ace0aa884e70c4d9e81dcefc.zip
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().
-rw-r--r--ldap/servers/plugins/replication/repl5_protocol.c7
1 files 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)