summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MdeModulePkg/Library/GenericBdsLib/BdsConsole.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/MdeModulePkg/Library/GenericBdsLib/BdsConsole.c b/MdeModulePkg/Library/GenericBdsLib/BdsConsole.c
index 999de49ba3..af3572ff7d 100644
--- a/MdeModulePkg/Library/GenericBdsLib/BdsConsole.c
+++ b/MdeModulePkg/Library/GenericBdsLib/BdsConsole.c
@@ -166,7 +166,7 @@ BdsLibUpdateConsoleVariable (
if (VarConsole != NULL) {
FreePool(VarConsole);
}
- if (NewDevicePath) {
+ if (NewDevicePath != NULL) {
FreePool(NewDevicePath);
}
}