diff options
author | Endi S. Dewata <edewata@redhat.com> | 2010-07-12 23:10:29 -0500 |
---|---|---|
committer | Noriko Hosoi <nhosoi@redhat.com> | 2010-08-19 13:01:29 -0700 |
commit | 657e7cfbe699b254ace0aa884e70c4d9e81dcefc (patch) | |
tree | 6365204a859e95e787c7cad43d25c6b3e9a8a1c1 | |
parent | 2aae0e55cf261c428292d391fd885d31e3de041a (diff) | |
download | ds-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.c | 7 |
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) |