git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95264
13f79535-47bb-0310-9956-
ffa450edef68
return ht;
}
+CACHE_DECLARE(void) cache_hash_free(cache_hash_t *ht)
+{
+ if (ht) {
+ if (ht->array) {
+ free (ht->array);
+ }
+ free (ht);
+ }
+}
/*
* Hash iteration functions.
*/
*/
CACHE_DECLARE(cache_hash_t *) cache_hash_make(apr_size_t size);
+/**
+ * Create a hash table.
+ * @param *ht Pointer to the hash table to be freed.
+ * @return void
+ * @remark The caller should ensure that all objects have been removed
+ * from the cache prior to calling cache_hash_free(). Objects
+ * not removed from the cache prior to calling cache_hash_free()
+ * will be unaccessable.
+ */
+CACHE_DECLARE(void) cache_hash_free(cache_hash_t *ht);
+
/**
* Associate a value with a key in a hash table.
}
}
+ /* Cache is empty, free the cache table */
+ cache_hash_free(co->cacheht);
+
if (sconf->lock) {
apr_thread_mutex_unlock(sconf->lock);
}