diff --git a/ShellPkg/Application/Shell/ShellProtocol.c b/ShellPkg/Application/Shell/ShellProtocol.c index 2ddb64d8c7..a6bf9c29b4 100644 --- a/ShellPkg/Application/Shell/ShellProtocol.c +++ b/ShellPkg/Application/Shell/ShellProtocol.c @@ -1468,6 +1468,7 @@ InternalShellExecuteDevicePath( if (NewHandle != NULL) { gBS->UnloadImage(NewHandle); } + FreePool (NewCmdLine); return (Status); } Status = gBS->OpenProtocol(