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:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user