# HG changeset patch # User Jason Rumney # Date 1202139712 0 # Node ID e96ff7166c81dd9c244e3a506f8ab2da58e3aa1a # Parent 1f6833ce07d93fa95dd85a971b3c71af5ef6be0c (w32font_open_internal): Use xmalloc, xrealloc, xfree. diff -r 1f6833ce07d9 -r e96ff7166c81 src/w32font.c --- a/src/w32font.c Mon Feb 04 14:25:13 2008 +0000 +++ b/src/w32font.c Mon Feb 04 15:41:52 2008 +0000 @@ -689,13 +689,13 @@ /* 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)