From 1e763434065c155c4b28fb684c3fa4de0dfff95e Mon Sep 17 00:00:00 2001 From: Hallvard Furuseth Date: Fri, 11 Feb 2011 11:43:18 +0000 Subject: [PATCH] Unlock new_cached_query->rwlock before destroying it. Fixes rev 1.210 (new since last OpenLDAP release). --- servers/slapd/overlays/pcache.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/servers/slapd/overlays/pcache.c b/servers/slapd/overlays/pcache.c index 6f96ced908..cb03e3ed80 100644 --- a/servers/slapd/overlays/pcache.c +++ b/servers/slapd/overlays/pcache.c @@ -1601,6 +1601,8 @@ add_query( templ->no_of_queries++; } else { ldap_pvt_thread_mutex_destroy(&new_cached_query->answerable_cnt_mutex); + if (wlock) + ldap_pvt_thread_rdwr_wunlock(&new_cached_query->rwlock); ldap_pvt_thread_rdwr_destroy( &new_cached_query->rwlock ); ch_free( new_cached_query ); new_cached_query = find_filter( op, qbase->scopes[query->scope], -- 2.39.5