mirror of
https://github.com/acidanthera/audk.git
synced 2025-04-07 19:45:07 +02:00
free allocated memory in error handler.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9173 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
95ba3c4150
commit
16a97771ad
@ -394,6 +394,12 @@ ErrorExit:
|
||||
if (UsbKeyboardDevice->SimpleInputEx.WaitForKeyEx != NULL) {
|
||||
gBS->CloseEvent (UsbKeyboardDevice->SimpleInputEx.WaitForKeyEx);
|
||||
}
|
||||
if (UsbKeyboardDevice->KeyboardLayoutEvent != NULL) {
|
||||
gBS->CloseEvent (UsbKeyboardDevice->KeyboardLayoutEvent);
|
||||
}
|
||||
if (UsbKeyboardDevice->KeyConvertionTable != NULL) {
|
||||
FreePool (UsbKeyboardDevice->KeyConvertionTable);
|
||||
}
|
||||
FreePool (UsbKeyboardDevice);
|
||||
UsbKeyboardDevice = NULL;
|
||||
}
|
||||
|
@ -598,6 +598,9 @@ SetKeyboardLayoutEvent (
|
||||
UINT8 KeyCode;
|
||||
|
||||
UsbKeyboardDevice = (USB_KB_DEV *) Context;
|
||||
if (UsbKeyboardDevice->Signature != USB_KB_DEV_SIGNATURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
// Try to get current keyboard layout from HII database
|
||||
|
Loading…
x
Reference in New Issue
Block a user