1diff -I '\$Id: ' -u -r -b -w -p -d --new-file --exclude-from=/Users/rstory/.rcfiles/diff-ignore SVN/include/net-snmp/agent/cache_handler.h APPLE/include/net-snmp/agent/cache_handler.h 2--- SVN/include/net-snmp/agent/cache_handler.h 3+++ APPLE/include/net-snmp/agent/cache_handler.h 4@@ -85,6 +85,8 @@ extern "C" { 5 netsnmp_cache_create(int timeout, NetsnmpCacheLoad * load_hook, 6 NetsnmpCacheFree * free_hook, 7 oid * rootoid, int rootoid_len); 8+ int netsnmp_cache_free(netsnmp_cache *cache); 9+ 10 netsnmp_mib_handler * 11 netsnmp_cache_handler_get(netsnmp_cache* cache); 12 13diff -I '\$Id: ' -u -r -b -w -p -d --new-file --exclude-from=/Users/rstory/.rcfiles/diff-ignore SVN/agent/helpers/cache_handler.c APPLE/agent/helpers/cache_handler.c 14--- SVN/agent/helpers/cache_handler.c 15+++ APPLE/agent/helpers/cache_handler.c 16@@ -173,6 +173,31 @@ netsnmp_cache_create(int timeout, Netsnm 17 return cache; 18 } 19 20+/** frees a cache 21+ */ 22+int 23+netsnmp_cache_free(netsnmp_cache *cache) 24+{ 25+ netsnmp_cache *pos; 26+ 27+ if (NULL == cache) 28+ return SNMPERR_SUCCESS; 29+ 30+ for (pos = cache_head; pos; pos = pos->next) { 31+ if (pos == cache) { 32+ snmp_log(LOG_WARNING, "not freeing cache (still in list)\n"); 33+ return SNMP_ERR_GENERR; 34+ } 35+ } 36+ 37+ if (cache->rootoid) 38+ free(cache->rootoid); 39+ 40+ free(cache); 41+ 42+ return SNMPERR_SUCCESS; 43+} 44+ 45 /** callback function to call cache load function */ 46 static void 47 _timer_reload(unsigned int regNo, void *clientargs) 48