From: Andreas Schwab Date: Mon, 1 Dec 2008 20:14:43 +0000 (+0000) Subject: (register_font_driver): Use xmalloc. X-Git-Tag: emacs-pretest-23.0.90~1381 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c115043bf3719eb7ed98db71d833e3e211d5c709;p=emacs.git (register_font_driver): Use xmalloc. (font_put_frame_data): Likewise. --- diff --git a/src/ChangeLog b/src/ChangeLog index f9e823aed05..7ae14388c64 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -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 --git a/src/font.c b/src/font.c index a8753ba7d62..ccac5af3fd8 100644 --- a/src/font.c +++ b/src/font.c @@ -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;