From c3cbd4125e70c2d82c008df6314c9bf866e583ae Mon Sep 17 00:00:00 2001 From: Jung-uk Kim Date: Tue, 6 Jul 2010 18:05:05 +0000 Subject: [PATCH] Fix a possible null pointer dereference. A patch for -STABLE was Submitted by: Yamagi Burmeister (lists at yamagi dot org) --- sys/dev/fb/vesa.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/dev/fb/vesa.c b/sys/dev/fb/vesa.c index 25a60e59bab..a039aee8baf 100644 --- a/sys/dev/fb/vesa.c +++ b/sys/dev/fb/vesa.c @@ -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(®s); regs.R_AX = 0x4f04;