mirror of https://github.com/acidanthera/audk.git
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…
Reference in New Issue