HCoop
/
bpt
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5aa2452
)
use xmalloc_unsafe in ftxfont_get_gcs
author
BT Templeton
<bpt@hcoop.net>
Thu, 28 Jun 2012 03:15:40 +0000
(23:15 -0400)
committer
Robin Templeton
<robin@terpri.org>
Sat, 18 Apr 2015 22:49:07 +0000
(18:49 -0400)
* src/ftxfont.c (ftxfont_get_gcs): Use `xmalloc_unsafe'.
src/ftxfont.c
patch
|
blob
|
blame
|
history
diff --git
a/src/ftxfont.c
b/src/ftxfont.c
index
53f2616
..
5bba449
100644
(file)
--- 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);
+
x
free (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);
+
x
free (new);
return NULL;
}
return new->gcs;