3e29ad0059ebf3c9b781ac5317e692ae2a2687bb braney Tue Jan 14 23:31:45 2020 -0800 hgCollection fiddles with the settingsHash of trackDb, which might be cached and made up of memory that shouldn't be freed. Copy the hash before fiddling with it. Found a bug in lmCloneHash (wasn't setting hash->lm correctly, so increment trackDb version just to make sure cache will be cleared. diff --git src/inc/localmem.h src/inc/localmem.h index 274435d..a36551a 100644 --- src/inc/localmem.h +++ src/inc/localmem.h @@ -77,16 +77,18 @@ char **lmCloneRow(struct lm *lm, char **row, int rowSize); /* Allocate an array of strings and its contents cloned from row. */ char **lmCloneRowExt(struct lm *lm, char **row, int rowOutSize, int rowInSize); /* Allocate an array of strings with rowOutSize elements. Clone the first rowInSize elements of * row into the new array; leave remaining elements NULL if rowOutSize is greater than rowInSize. * rowOutSize must be greater than or equal to rowInSize. */ void lmRefAdd(struct lm *lm, struct slRef **pRefList, void *val); /* Add reference to list. */ char *lmJoinStrings(struct lm *lm, char *a, char *b); /* Return concatenation of a and b allocated in lm */ +struct hash *lmCloneHash(struct lm *lm, struct hash *hash); +/* Clone a hash into local memory. ASSUMES VALUES ARE STRINGS */ #endif//ndef LOCALMEM_H