rem: Tcl_DeleteHashEntry(cachePtr->hPtr);
add: if (cachePtr->hPtr != NULL) { Tcl_DeleteHashEntry(cachePtr->hPtr); }
context: Ns_CacheDestroy(Ns_Cache *cache){    Cache *cachePtr = (Cache *) cache;    /*     * Unschedule the flusher if time-based cache.     */    if (cachePtr->schedId >= 0) {    	Ns_MutexLock(&cachePtr->lock);	cachePtr->schedStop = 1;    	if (Ns_Cancel(cachePtr->schedId)) {	    cachePtr->schedId = -1;	}	/*	 * Wait for currently running flusher to exit.	 */	while (cachePtr->schedId >= 0) {	    Ns_CondWait(&cachePtr->cond, &cachePtr->lock);	}    	Ns_MutexUnlock(&cachePtr->lock);    }    /*     * Flush all entries.     */    Ns_CacheFlush(cache);    /*     * Remove from cache table and free cache structure.     */    Ns_MutexLock(&lock);    Tcl_DeleteHashEntry(cachePtr->hPtr);    Ns_MutexUnlock(&lock);    Ns_MutexDestroy(&cachePtr->lock);    Ns_CondDestroy(&cachePtr->cond);    Tcl_DeleteHashTable(&cachePtr->entriesTable);    ns_free(cachePtr);}