1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-03-14 06:15:46 +01:00

fixed a memleak in the font panel in WINGs

This commit is contained in:
dan
2002-11-29 02:47:33 +00:00
parent 1fa3937001
commit 5ad557c6c8
5 changed files with 18 additions and 33 deletions

View File

@@ -573,7 +573,6 @@ addTypefaceToFamily(Family *family, char fontFields[NUM_FIELDS][256])
}
/*
* families (same family name) (Hashtable of family -> array)
* registries (same family but different registries)
@@ -695,13 +694,12 @@ static void
listFamilies(WMScreen *scr, WMFontPanel *panel)
{
char **fontList;
int count;
int i;
WMHashTable *families = WMCreateHashTable(WMStringPointerHashCallbacks);
WMHashTable *families;
char fields[NUM_FIELDS][256];
WMHashEnumerator enumer;
WMArray *array;
int i, count;
fontList = XListFonts(scr->display, ALL_FONTS_MASK, MAX_FONTS_TO_RETRIEVE,
&count);
if (!fontList) {
@@ -710,6 +708,8 @@ listFamilies(WMScreen *scr, WMFontPanel *panel)
return;
}
families = WMCreateHashTable(WMStringPointerHashCallbacks);
for (i = 0; i < count; i++) {
int fname_len;
@@ -757,7 +757,6 @@ listFamilies(WMScreen *scr, WMFontPanel *panel)
item->clientData = fam;
}
/* Isn't this going to memleak since items weren't released? --Dan */
WMFreeArray(array);
}
WMSortListItems(panel->famLs);