mirror of
https://github.com/systemd/systemd.git
synced 2024-10-28 11:55:44 +03:00
vconsole-setup: Store fonts on heap (#3268)
More friendly to the stack.
This commit is contained in:
parent
7656702318
commit
6a08e1b0cd
@ -195,9 +195,15 @@ static void font_copy_to_all_vcs(int fd) {
|
||||
unsigned char map8[E_TABSZ];
|
||||
unsigned short map16[E_TABSZ];
|
||||
struct unimapdesc unimapd;
|
||||
struct unipair unipairs[USHRT_MAX];
|
||||
_cleanup_free_ struct unipair* unipairs = NULL;
|
||||
int i, r;
|
||||
|
||||
unipairs = new(struct unipair, USHRT_MAX);
|
||||
if (unipairs == NULL) {
|
||||
log_error("Not enough memory to copy fonts");
|
||||
return;
|
||||
}
|
||||
|
||||
/* get active, and 16 bit mask of used VT numbers */
|
||||
r = ioctl(fd, VT_GETSTATE, &vcs);
|
||||
if (r < 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user