Index: src/libpcb_fp.c =================================================================== --- src/libpcb_fp.c (revision 1252) +++ src/libpcb_fp.c (revision 1253) @@ -111,6 +111,15 @@ return e == NULL ? NULL : e->key; } +void pcb_fp_uninit() +{ + htsp_entry_t *e; + for (e = htsp_first(pcb_fp_tags); e; e = htsp_next(pcb_fp_tags, e)) + free(e->key); + htsp_free(pcb_fp_tags); + pcb_fp_tags = NULL; +} + const char *pcb_fp_tagname(const void *tagid) { return (char *) tagid; Index: src/libpcb_fp.h =================================================================== --- src/libpcb_fp.h (revision 1252) +++ src/libpcb_fp.h (revision 1253) @@ -47,4 +47,7 @@ /* Resolve a tag ID to a tag name */ const char *pcb_fp_tagname(const void *tagid); +/* Uninit the footprint lib, free tag key memory */ +void pcb_fp_uninit(); + #endif Index: src/main.c =================================================================== --- src/main.c (revision 1252) +++ src/main.c (revision 1253) @@ -1601,6 +1601,7 @@ uninit_strflags_layerlist(); FreeLibraryMemory(&Library); + pcb_fp_uninit(); #define free0(ptr) \ do { \ Index: src/mymem.c =================================================================== --- src/mymem.c (revision 1252) +++ src/mymem.c (revision 1253) @@ -706,6 +706,8 @@ free(entry->AllocatedMemory); if (!entry->ListEntry_dontfree) free(entry->ListEntry); + if (entry->Tags != NULL) + free(entry->Tags); } END_LOOP; free(menu->Entry);