From 16a97771adb0678d5e22935a091aebfbfbd3f071 Mon Sep 17 00:00:00 2001 From: eric_tian Date: Mon, 24 Aug 2009 06:24:24 +0000 Subject: free allocated memory in error handler. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9173 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.c') 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 -- cgit v1.2.3