summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.c
diff options
context:
space:
mode:
authoreric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524>2009-08-24 06:24:24 +0000
committereric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524>2009-08-24 06:24:24 +0000
commit16a97771adb0678d5e22935a091aebfbfbd3f071 (patch)
treec44a6c6362a759f145cd1b1757e9286f7a9c7be0 /MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.c
parent95ba3c4150701418aa0806597fdc2e3099b62f79 (diff)
downloadedk2-platforms-16a97771adb0678d5e22935a091aebfbfbd3f071.tar.xz
free allocated memory in error handler.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9173 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.c')
-rw-r--r--MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.c b/MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.c
index 51ab18223e..40f9a5633a 100644
--- a/MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.c
+++ b/MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.c
@@ -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