USB_NS_KEY *UsbNsKey;\r
LIST_ENTRY *Link;\r
\r
- SafeFreePool (UsbKeyboardDevice->KeyConvertionTable);\r
+ if (UsbKeyboardDevice->KeyConvertionTable != NULL) {\r
+ FreePool (UsbKeyboardDevice->KeyConvertionTable);\r
+ }\r
UsbKeyboardDevice->KeyConvertionTable = NULL;\r
\r
while (!IsListEmpty (&UsbKeyboardDevice->NsKeyList)) {\r
UsbNsKey = USB_NS_KEY_FORM_FROM_LINK (Link);\r
RemoveEntryList (&UsbNsKey->Link);\r
\r
- gBS->FreePool (UsbNsKey->NsKey);\r
- gBS->FreePool (UsbNsKey);\r
+ FreePool (UsbNsKey->NsKey);\r
+ FreePool (UsbNsKey);\r
}\r
}\r
\r