drm_common: add missing zero-initialization of struct vt_mode variable

Some fields were being left uninitialized. This could be a problem
particularly on non-Linux OS:s with vt_mode (see PR #6976).
This commit is contained in:
Anton Kindestam 2019-09-24 21:46:52 +02:00
parent 68ce36a2db
commit bbf6e103b4
1 changed files with 1 additions and 1 deletions

View File

@ -805,7 +805,7 @@ bool vt_switcher_init(struct vt_switcher *s, struct mp_log *log)
return false;
}
struct vt_mode vt_mode;
struct vt_mode vt_mode = { 0 };
if (ioctl(s->tty_fd, VT_GETMODE, &vt_mode) < 0) {
MP_ERR(s, "VT_GETMODE failed: %s\n", mp_strerror(errno));
return false;