summaryrefslogtreecommitdiffstats
path: root/ldap/servers/slapd/back-ldbm/ldbm_modrdn.c
diff options
context:
space:
mode:
authorNoriko Hosoi <nhosoi@redhat.com>2010-02-22 08:49:49 -0800
committerNoriko Hosoi <nhosoi@redhat.com>2010-02-22 08:49:49 -0800
commit4205086e4f237a52eb9113cd95f9cf87b39e9ed4 (patch)
treeb04614f371d5bfdb496e61781573ddb1166aa16a /ldap/servers/slapd/back-ldbm/ldbm_modrdn.c
parent79e93093e031bdd5a0bc047baf767644832eb562 (diff)
downloadds-4205086e4f237a52eb9113cd95f9cf87b39e9ed4.tar.gz
ds-4205086e4f237a52eb9113cd95f9cf87b39e9ed4.tar.xz
ds-4205086e4f237a52eb9113cd95f9cf87b39e9ed4.zip
539618 - Replication bulk import reports Invalid read/write
https://bugzilla.redhat.com/show_bug.cgi?id=539618 Descriptions: When a protocol is freed by prot_free, prot_close is supposed to have been called to stop the main thread prot_thread_main. But, there was no mechanism for the freeing thread whether the prot_thread_main has already quitted or not, it could have released the Repl_Protocol even though it was still being in use. This fix is adding a checking method. The same test revealed ldbm_back_modrdn had a chance to access a field of NULL entry structure.
Diffstat (limited to 'ldap/servers/slapd/back-ldbm/ldbm_modrdn.c')
-rw-r--r--ldap/servers/slapd/back-ldbm/ldbm_modrdn.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_modrdn.c b/ldap/servers/slapd/back-ldbm/ldbm_modrdn.c
index 117eb3b0..5e2b1851 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_modrdn.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_modrdn.c
@@ -933,7 +933,7 @@ error_return:
slapi_entry_free( postentry );
postentry= NULL;
}
- if (entryrdn_get_switch())
+ if (e && entryrdn_get_switch())
{
struct backdn *bdn = dncache_find_id(&inst->inst_dncache, e->ep_id);
CACHE_REMOVE(&inst->inst_dncache, bdn);