a2a57a6247e93612140baa899ddb3c462af8f12e
braney
  Wed Jan 15 23:37:27 2020 -0800
mark hashes that are coming in from trackDb cache so they don't get
freed

diff --git src/lib/hash.c src/lib/hash.c
index 989beb3..67dca93 100644
--- src/lib/hash.c
+++ src/lib/hash.c
@@ -180,31 +180,31 @@
  * is removed (LIFO behavior).
  */
 {
 struct hashEl *hel;
 void *ret;
 struct hashEl **pBucket = &hash->table[hashString(name)&hash->mask];
 for (hel = *pBucket; hel != NULL; hel = hel->next)
     if (sameString(hel->name, name))
         break;
 if (hel == NULL)
     return NULL;
 ret = hel->val;
 if (slRemoveEl(pBucket, hel))
     {
     hash->elCount -= 1;
-    if (!hash->lm)
+    if (!hash->lm && !hash->ownLm)   // if we didn't come from local mem or trackDb cache
 	freeHashEl(hel);
     }
 return ret;
 }
 
 struct hashEl *hashAddUnique(struct hash *hash, char *name, void *val)
 /* Add new element to hash table. Squawk and die if not unique */
 {
 if (hashLookup(hash, name) != NULL)
     errAbort("%s duplicated, aborting", name);
 return hashAdd(hash, name, val);
 }
 
 struct hashEl *hashAddSaveName(struct hash *hash, char *name, void *val, char **saveName)
 /* Add new element to hash table.  Save the name of the element, which is now