From a9a50a6a3e2e1d78c29fc152b8d128424819655d Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Sun, 5 Apr 2009 04:17:06 +0000 Subject: [PATCH] ITS#6021 minor cleanup --- servers/slapd/overlays/pcache.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/servers/slapd/overlays/pcache.c b/servers/slapd/overlays/pcache.c index 2ad67c2f50..d91b6f327c 100644 --- a/servers/slapd/overlays/pcache.c +++ b/servers/slapd/overlays/pcache.c @@ -1175,6 +1175,8 @@ free_query (CachedQuery* qc) { free(qc->q_uuid.bv_val); filter_free(qc->filter); + ldap_pvt_thread_rdwr_destroy( &qc->rwlock ); + memset(qc, 0, sizeof(*qc)); free(qc); } @@ -1264,6 +1266,7 @@ add_query( new_cached_query = find_filter( op, qbase->scopes[query->scope], query->filter, first ); filter_free( query->filter ); + query->filter = NULL; } Debug( pcache_debug, "TEMPLATE %p QUERIES++ %d\n", (void *) templ, templ->no_of_queries, 0 ); -- 2.39.5