summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ChangeLog1
-rw-r--r--src/w32font.c6
2 files changed, 4 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 2747f40fe40..ef06b02aa2e 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -21,6 +21,7 @@
* w32font.c (w32font_open_internal): Use font_unparse_fcname to
set full_name.
+ (w32font_open_internal): Use xmalloc, xrealloc, xfree.
2008-02-03 Jason Rumney <jasonr@gnu.org>
diff --git a/src/w32font.c b/src/w32font.c
index e2973db0eb6..b0e6b250a90 100644
--- a/src/w32font.c
+++ b/src/w32font.c
@@ -689,13 +689,13 @@ w32font_open_internal (f, font_entity, pixel_size, w32_font)
/* We don't know how much space we need for the full name, so start with
96 bytes and go up in steps of 32. */
len = 96;
- name = malloc (len);
+ name = xmalloc (len);
while (name && font_unparse_fcname (font_entity, pixel_size, name, len) < 0)
{
- char *new = realloc (name, len += 32);
+ char *new = xrealloc (name, len += 32);
if (! new)
- free (name);
+ xfree (name);
name = new;
}
if (name)