svn commit: r210304 - stable/8/sys/dev/fb
Jung-uk Kim
jkim at FreeBSD.org
Tue Jul 20 18:43:16 UTC 2010
Author: jkim
Date: Tue Jul 20 18:43:15 2010
New Revision: 210304
URL: http://svn.freebsd.org/changeset/base/210304
Log:
MFC: r209737, r209740
Fix a possible null pointer dereference and plug a possible memory leak.
Modified:
stable/8/sys/dev/fb/vesa.c
Directory Properties:
stable/8/sys/ (props changed)
stable/8/sys/amd64/include/xen/ (props changed)
stable/8/sys/cddl/contrib/opensolaris/ (props changed)
stable/8/sys/contrib/dev/acpica/ (props changed)
stable/8/sys/contrib/pf/ (props changed)
stable/8/sys/dev/xen/xenpci/ (props changed)
Modified: stable/8/sys/dev/fb/vesa.c
==============================================================================
--- stable/8/sys/dev/fb/vesa.c Tue Jul 20 18:28:34 2010 (r210303)
+++ stable/8/sys/dev/fb/vesa.c Tue Jul 20 18:43:15 2010 (r210304)
@@ -536,6 +536,8 @@ vesa_bios_save_restore(int code, void *p
return (1);
buf = x86bios_alloc(&offs, size);
+ if (buf == NULL)
+ return (1);
x86bios_init_regs(®s);
regs.R_AX = 0x4f04;
@@ -836,7 +838,7 @@ vesa_bios_init(void)
"version 1.2 or later is required.\n",
((vers & 0xf000) >> 12) * 10 + ((vers & 0x0f00) >> 8),
((vers & 0x00f0) >> 4) * 10 + (vers & 0x000f));
- return (1);
+ goto fail;
}
VESA_STRCPY(vesa_oemstr, buf->v_oemstr);
More information about the svn-src-all
mailing list