]> git.eshelyaron.com Git - emacs.git/commitdiff
(register_font_driver): Use xmalloc.
authorAndreas Schwab <schwab@suse.de>
Mon, 1 Dec 2008 20:14:43 +0000 (20:14 +0000)
committerAndreas Schwab <schwab@suse.de>
Mon, 1 Dec 2008 20:14:43 +0000 (20:14 +0000)
(font_put_frame_data): Likewise.

src/ChangeLog
src/font.c

index f9e823aed051c0733a63f9e44f0153e8e480dd37..7ae14388c64884f834c53c5f68098187882fa877 100644 (file)
@@ -1,3 +1,8 @@
+2008-12-01  Andreas Schwab  <schwab@suse.de>
+
+       * font.c (register_font_driver): Use xmalloc.
+       (font_put_frame_data): Likewise.
+
 2008-12-01  Chong Yidong  <cyd@stupidchicken.com>
 
        * xfaces.c (realize_x_face): Make abort condition clearer.
index a8753ba7d62df064b3831ed8a1face3a9758680e..ccac5af3fd874fda69505cc5e46ce562e6ddb1b1 100644 (file)
@@ -3451,7 +3451,7 @@ register_font_driver (driver, f)
     if (EQ (list->driver->type, driver->type))
       error ("Duplicated font driver: %s", SDATA (SYMBOL_NAME (driver->type)));
 
-  list = malloc (sizeof (struct font_driver_list));
+  list = xmalloc (sizeof (struct font_driver_list));
   list->on = 0;
   list->driver = driver;
   list->next = NULL;
@@ -3577,9 +3577,7 @@ font_put_frame_data (f, driver, data)
 
   if (! list)
     {
-      list = malloc (sizeof (struct font_data_list));
-      if (! list)
-       return -1;
+      list = xmalloc (sizeof (struct font_data_list));
       list->driver = driver;
       list->next = f->font_data_list;
       f->font_data_list = list;