Remove unnecessary pointer increment. A wrong pointer may be passed to
free(9) and it can cause kernel panic when there are multiple graphics controllers in the system. Tested by: Brandon Gooch (jamesbrandongooch at gmail dot com) MFC after: 3 days
This commit is contained in:
parent
fdb2feee16
commit
842795abcc
@ -240,10 +240,10 @@ vesa_bios_post(void)
|
||||
/* Find the matching PCI video controller. */
|
||||
dc = devclass_find("vgapci");
|
||||
if (dc != NULL && devclass_get_devices(dc, &devs, &count) == 0) {
|
||||
for (dev = NULL, i = 0; dev == NULL && i < count; devs++, i++)
|
||||
if (device_get_flags(*devs) != 0 &&
|
||||
x86bios_match_device(0xc0000, *devs)) {
|
||||
dev = *devs;
|
||||
for (i = 0; i < count; i++)
|
||||
if (device_get_flags(devs[i]) != 0 &&
|
||||
x86bios_match_device(0xc0000, devs[i])) {
|
||||
dev = devs[i];
|
||||
is_pci = 1;
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user