This patch deletes the line free(fontnames[fix]); from /sys/src/cmd/acme/acme.c:/^rfget. The strings fontnames[i] do not necessarily come from malloc: Initially, they are statically allocated. Other code that sets fontnames[i] does not free first; for example /sys/src/cmd/acme/acme.c:/^threadmain /sys/src/cmd/acme/rows.c:/^rowloadfonts The following seems to crash acme reliably (and does not with this patch): Run it like /386/bin/acme to avoid any Load or command-line changes to fontnames. Put the text Font var /lib/font/bit/lucidasans/unicode.6.font in a window (not a tag). Execute the text with the middle button. Notes: Mon Dec 6 12:16:25 EST 2004 rsc why is this okay? i think maybe the stuff in fontnames should be estrdup'ed. and then then free is okay. right now for example there are calls to rfget that could copy name into the array and then the next line after the rfget call is free(name). so estrdup seems required. and once estrdup is required the free is correct. Thu Dec 9 13:09:33 EST 2004 swasey The small space leak did not bother me (or, presumably, the original author). As you suggest, it would be better to estrdup the initial values and establish the invariant that after that initialization, fontnames[i] are allocated with malloc. Some "missing" frees could be added. I can submit another patch. Reference: /n/sources/patch/sorry/acme-fontnames Date: Mon Dec 20 18:57:29 CET 2004 Reviewed-by: rsc --- /sys/src/cmd/acme/acme.c Mon Dec 20 18:57:29 2004 +++ /sys/src/cmd/acme/acme.c Mon Dec 20 18:57:29 2004 @@ -798,7 +798,6 @@ if(reffonts[fix]) rfclose(reffonts[fix]); reffonts[fix] = r; - free(fontnames[fix]); fontnames[fix] = name; } if(setfont){