When loading a Type 1 font, remember to terminate the linked list we load
[sgt/halibut] / malloc.c
index 1635b47..2ff22fd 100644 (file)
--- a/malloc.c
+++ b/malloc.c
@@ -101,10 +101,10 @@ char *dupstr(char *s) {
  * Duplicate a linked list of words
  */
 word *dup_word_list(word *w) {
-    word *head, **eptr = &head;
+    word *head = NULL, **eptr = &head;
 
     while (w) {
-       word *newwd = mknew(word);
+       word *newwd = snew(word);
        *newwd = *w;                   /* structure copy */
        newwd->text = ustrdup(w->text);
        if (w->alt)