summaryrefslogtreecommitdiffstats
path: root/ShellPkg/Library/UefiShellLib/UefiShellLib.c
diff options
context:
space:
mode:
Diffstat (limited to 'ShellPkg/Library/UefiShellLib/UefiShellLib.c')
-rw-r--r--ShellPkg/Library/UefiShellLib/UefiShellLib.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ShellPkg/Library/UefiShellLib/UefiShellLib.c b/ShellPkg/Library/UefiShellLib/UefiShellLib.c
index 93e36197b2..f023505300 100644
--- a/ShellPkg/Library/UefiShellLib/UefiShellLib.c
+++ b/ShellPkg/Library/UefiShellLib/UefiShellLib.c
@@ -3820,7 +3820,10 @@ ShellPromptForResponseHii (
Prompt = HiiGetString (HiiFormatHandle, HiiFormatStringId, NULL);
Status = ShellPromptForResponse (Type, Prompt, Response);
- FreePool (Prompt);
+ if (Prompt != NULL) {
+ FreePool (Prompt);
+ }
+
return (Status);
}