Coverity #857: Fix resource leak in error path by freeing earlier.

This commit is contained in:
Eric Anholt 2006-03-10 08:03:24 +00:00
parent 55f677d600
commit 1bc72dce5f
2 changed files with 7 additions and 1 deletions

View File

@ -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>
* hw/xfree86/parser/Keyboard.c: (xf86parseKeyboardSection):

View File

@ -232,6 +232,8 @@ xf86ExtendedInitInt10(int entityIndex, int Flags)
} else
location_type = pEnt->location.type;
xfree(pEnt);
switch (location_type) {
case BUS_PCI:
vbiosMem = (unsigned char *)base + bios_location;
@ -263,7 +265,6 @@ xf86ExtendedInitInt10(int entityIndex, int Flags)
default:
goto error1;
}
xfree(pEnt);
pInt->BIOSseg = V_BIOS >> 4;
pInt->num = 0xe6;
LockLegacyVGA(pInt, &vga);