From da92bf853f573d244278ab944720005598fa0450 Mon Sep 17 00:00:00 2001 From: Brendan Jackman Date: Tue, 11 Feb 2014 22:43:36 +0000 Subject: [PATCH] ShellPkg: Error out when ProcessCommandLine fails Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Brendan Jackman Reviewed-by: Olivier Martin Reviewed-by: Jaben Carsey git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15222 6f19259b-4bc3-4df7-8a09-765794883524 --- ShellPkg/Application/Shell/Shell.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ShellPkg/Application/Shell/Shell.c b/ShellPkg/Application/Shell/Shell.c index df101a32af..72d7516b28 100644 --- a/ShellPkg/Application/Shell/Shell.c +++ b/ShellPkg/Application/Shell/Shell.c @@ -359,7 +359,10 @@ UefiMain ( // // Check the command line // - Status = ProcessCommandLine(); + Status = ProcessCommandLine (); + if (EFI_ERROR (Status)) { + goto FreeResources; + } // // If shell support level is >= 1 create the mappings and paths -- 2.39.2