Skip to content

Commit

Permalink
Issue 6555 - V2 - Potential crash when deleting a replicated backend (#…
Browse files Browse the repository at this point in the history
…6585)

* Issue 6555 - Potential crash when deleting a replicated backend - hang at shutdown
Prevent previous 6555 fix to hang at shutdown.

Issue: #6555

Reviewed by: @tbordaz
  • Loading branch information
progier389 authored Feb 6, 2025
1 parent 5e19dfe commit 2092a1b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ldap/servers/plugins/replication/repl5_replica_hash.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,11 @@ replica_destroy_name_hash()

if (s_hash)
PL_HashTableDestroy(s_hash);
s_hash = NULL;

if (s_lock)
slapi_destroy_rwlock(s_lock);
s_lock = NULL;
}

int
Expand Down Expand Up @@ -207,7 +209,7 @@ replica_check_validity(Replica *replica)
{
struct repl_enum_validity data = { replica, false };

if (replica == NULL) {
if (replica == NULL || s_lock == NULL) {
return false;
}
slapi_rwlock_rdlock(s_lock);
Expand Down

0 comments on commit 2092a1b

Please sign in to comment.