diff options
-rw-r--r-- | Build/source/texk/kpathsea/ChangeLog | 6 | ||||
-rw-r--r-- | Build/source/texk/kpathsea/fontmap.c | 7 |
2 files changed, 10 insertions, 3 deletions
diff --git a/Build/source/texk/kpathsea/ChangeLog b/Build/source/texk/kpathsea/ChangeLog index e0dad3de1f2..01a9d115bf9 100644 --- a/Build/source/texk/kpathsea/ChangeLog +++ b/Build/source/texk/kpathsea/ChangeLog @@ -1,3 +1,9 @@ +2007-08-27 Karl Berry <karl@tug.org> + + * fontmap.c (map_file_parse): free the original pointer, not the + potentially moved one (after whitespace skipping). + From: "George N. White III", 25 Jul 2007 11:27:12. + 2007-07-29 Karl Berry <karl@tug.org> * depend.mk: regenerate again. diff --git a/Build/source/texk/kpathsea/fontmap.c b/Build/source/texk/kpathsea/fontmap.c index abcf59bd54d..9f94c9a0158 100644 --- a/Build/source/texk/kpathsea/fontmap.c +++ b/Build/source/texk/kpathsea/fontmap.c @@ -88,7 +88,7 @@ map_file_parse P1C(const_string, map_filename) while ((orig_l = read_line (f)) != NULL) { string filename; - string l = orig_l; + string l = orig_l; /* save for free() */ string comment_loc = strrchr (l, '%'); if (!comment_loc) { comment_loc = strstr (l, "@c"); @@ -136,12 +136,13 @@ map_file_parse P1C(const_string, map_filename) } else { /* We've got everything. Insert the new entry. They were - already dynamically allocated, so don't bother with xstrdup. */ + already dynamically allocated by token(), so don't bother + with xstrdup. */ hash_insert_normalized (&map, alias, filename); } } - free (l); + free (orig_l); } xfclose (f, map_filename); |