diff options
Diffstat (limited to 'src/systemd-vconsole')
-rw-r--r-- | src/systemd-vconsole/vconsole-setup.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/systemd-vconsole/vconsole-setup.c b/src/systemd-vconsole/vconsole-setup.c index 8a1b824e65..1118118450 100644 --- a/src/systemd-vconsole/vconsole-setup.c +++ b/src/systemd-vconsole/vconsole-setup.c @@ -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) { + log_oom(); + return; + } + /* get active, and 16 bit mask of used VT numbers */ r = ioctl(fd, VT_GETSTATE, &vcs); if (r < 0) { |