# HG changeset patch # User Andreas Schwab # Date 1228162483 0 # Node ID c2ef1c8b2d64848031eb212c461392f69e6d8495 # Parent 25295c680f6b351fd443c7836f6bbf6573285a25 (register_font_driver): Use xmalloc. (font_put_frame_data): Likewise. diff -r 25295c680f6b -r c2ef1c8b2d64 src/ChangeLog --- a/src/ChangeLog Mon Dec 01 18:08:59 2008 +0000 +++ b/src/ChangeLog Mon Dec 01 20:14:43 2008 +0000 @@ -1,3 +1,8 @@ +2008-12-01 Andreas Schwab + + * font.c (register_font_driver): Use xmalloc. + (font_put_frame_data): Likewise. + 2008-12-01 Chong Yidong * xfaces.c (realize_x_face): Make abort condition clearer. diff -r 25295c680f6b -r c2ef1c8b2d64 src/font.c --- a/src/font.c Mon Dec 01 18:08:59 2008 +0000 +++ b/src/font.c Mon Dec 01 20:14:43 2008 +0000 @@ -3451,7 +3451,7 @@ 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 @@ 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;