aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Rumney2008-02-04 15:42:57 +0000
committerJason Rumney2008-02-04 15:42:57 +0000
commite3a77b22d272d31cedbd9eab9b37feda0e13f8d6 (patch)
treeaf280a091cfdc5a1601052d7e465de7da9c5a1e0
parent880a5954219991fff1f2de45cfc5b82323cee987 (diff)
downloademacs-e3a77b22d272d31cedbd9eab9b37feda0e13f8d6.tar.gz
emacs-e3a77b22d272d31cedbd9eab9b37feda0e13f8d6.zip
(w32font_open_internal): Use xmalloc, xrealloc, xfree.
-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 @@
21 21
22 * w32font.c (w32font_open_internal): Use font_unparse_fcname to 22 * w32font.c (w32font_open_internal): Use font_unparse_fcname to
23 set full_name. 23 set full_name.
24 (w32font_open_internal): Use xmalloc, xrealloc, xfree.
24 25
252008-02-03 Jason Rumney <jasonr@gnu.org> 262008-02-03 Jason Rumney <jasonr@gnu.org>
26 27
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)
689 /* We don't know how much space we need for the full name, so start with 689 /* We don't know how much space we need for the full name, so start with
690 96 bytes and go up in steps of 32. */ 690 96 bytes and go up in steps of 32. */
691 len = 96; 691 len = 96;
692 name = malloc (len); 692 name = xmalloc (len);
693 while (name && font_unparse_fcname (font_entity, pixel_size, name, len) < 0) 693 while (name && font_unparse_fcname (font_entity, pixel_size, name, len) < 0)
694 { 694 {
695 char *new = realloc (name, len += 32); 695 char *new = xrealloc (name, len += 32);
696 696
697 if (! new) 697 if (! new)
698 free (name); 698 xfree (name);
699 name = new; 699 name = new;
700 } 700 }
701 if (name) 701 if (name)