Coverity #857: Fix resource leak in error path by freeing earlier.
This commit is contained in:
parent
55f677d600
commit
1bc72dce5f
|
@ -1,3 +1,8 @@
|
||||||
|
2006-03-09 Eric Anholt <anholt@FreeBSD.org>
|
||||||
|
|
||||||
|
* hw/xfree86/int10/generic.c: (xf86ExtendedInitInt10):
|
||||||
|
Coverity #857: Fix resource leak in error path by freeing earlier.
|
||||||
|
|
||||||
2006-03-09 Eric Anholt <anholt@FreeBSD.org>
|
2006-03-09 Eric Anholt <anholt@FreeBSD.org>
|
||||||
|
|
||||||
* hw/xfree86/parser/Keyboard.c: (xf86parseKeyboardSection):
|
* hw/xfree86/parser/Keyboard.c: (xf86parseKeyboardSection):
|
||||||
|
|
|
@ -232,6 +232,8 @@ xf86ExtendedInitInt10(int entityIndex, int Flags)
|
||||||
} else
|
} else
|
||||||
location_type = pEnt->location.type;
|
location_type = pEnt->location.type;
|
||||||
|
|
||||||
|
xfree(pEnt);
|
||||||
|
|
||||||
switch (location_type) {
|
switch (location_type) {
|
||||||
case BUS_PCI:
|
case BUS_PCI:
|
||||||
vbiosMem = (unsigned char *)base + bios_location;
|
vbiosMem = (unsigned char *)base + bios_location;
|
||||||
|
@ -263,7 +265,6 @@ xf86ExtendedInitInt10(int entityIndex, int Flags)
|
||||||
default:
|
default:
|
||||||
goto error1;
|
goto error1;
|
||||||
}
|
}
|
||||||
xfree(pEnt);
|
|
||||||
pInt->BIOSseg = V_BIOS >> 4;
|
pInt->BIOSseg = V_BIOS >> 4;
|
||||||
pInt->num = 0xe6;
|
pInt->num = 0xe6;
|
||||||
LockLegacyVGA(pInt, &vga);
|
LockLegacyVGA(pInt, &vga);
|
||||||
|
|
Loading…
Reference in New Issue