From: Howard Chu Date: Sun, 5 Apr 2009 04:17:06 +0000 (+0000) Subject: ITS#6021 minor cleanup X-Git-Tag: ACLCHECK_0~642 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a9a50a6a3e2e1d78c29fc152b8d128424819655d;p=openldap ITS#6021 minor cleanup --- 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 );