From: BT Templeton Date: Thu, 28 Jun 2012 03:15:40 +0000 (-0400) Subject: use xmalloc_unsafe in ftxfont_get_gcs X-Git-Url: https://git.hcoop.net/bpt/emacs.git/commitdiff_plain/4b7dfb29ff9a79a4a503c2dcf18bacb00b8212dc?hp=5aa2452f36e85db53139c8cf1773a7c511da4188 use xmalloc_unsafe in ftxfont_get_gcs * src/ftxfont.c (ftxfont_get_gcs): Use `xmalloc_unsafe'. --- diff --git a/src/ftxfont.c b/src/ftxfont.c index 53f2616bb6..5bba449ab0 100644 --- a/src/ftxfont.c +++ b/src/ftxfont.c @@ -78,7 +78,7 @@ ftxfont_get_gcs (struct frame *f, unsigned long foreground, unsigned long backgr } } - new = malloc (sizeof *new); + new = xmalloc_unsafe (sizeof *new); if (! new) return NULL; new->next = this; @@ -88,7 +88,7 @@ ftxfont_get_gcs (struct frame *f, unsigned long foreground, unsigned long backgr } else if (font_put_frame_data (f, &ftxfont_driver, new) < 0) { - free (new); + xfree (new); return NULL; } @@ -124,7 +124,7 @@ ftxfont_get_gcs (struct frame *f, unsigned long foreground, unsigned long backgr prev->next = new->next; else if (data) font_put_frame_data (f, &ftxfont_driver, new->next); - free (new); + xfree (new); return NULL; } return new->gcs;