diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c index ca85619113..c853dc2f52 100644 --- a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c +++ b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c @@ -1242,7 +1242,7 @@ Exit: if (Value != NULL) { FreePool (Value); } - if (ConfigElement) { + if (ConfigElement != NULL) { FreePool (ConfigElement); }