Fix a possible null pointer dereference. A patch for -STABLE was

Submitted by:	Yamagi Burmeister (lists at yamagi dot org)
This commit is contained in:
Jung-uk Kim 2010-07-06 18:05:05 +00:00
parent f59646c2af
commit c3cbd4125e

View File

@ -536,6 +536,8 @@ vesa_bios_save_restore(int code, void *p, size_t size)
return (1);
buf = x86bios_alloc(&offs, size, M_NOWAIT);
if (buf == NULL)
return (1);
x86bios_init_regs(&regs);
regs.R_AX = 0x4f04;