summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2007-08-27 00:11:21 +0000
committerKarl Berry <karl@freefriends.org>2007-08-27 00:11:21 +0000
commit355513331b6d259e73e320e3ec7256018f865a0a (patch)
tree97d8c66e203a7547322a9a7b10ecac7a10030612 /Build
parentc1177ae0262566d486b8f759d57ecde7d4017add (diff)
free original pointer from malloc
git-svn-id: svn://tug.org/texlive/trunk@4824 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/kpathsea/ChangeLog6
-rw-r--r--Build/source/texk/kpathsea/fontmap.c7
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);