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.
|