]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Application/Shell/ShellProtocol.c
ShellPkg: Fix memory leak in 'InternalShellExecuteDevicePath'.
[mirror_edk2.git] / ShellPkg / Application / Shell / ShellProtocol.c
index 2ddb64d8c7d69a18cd5730925f59ebd7b6743ce7..a6bf9c29b4f6a8c590d8199d99701bbeb996d8a2 100644 (file)
@@ -1468,6 +1468,7 @@ InternalShellExecuteDevicePath(
     if (NewHandle != NULL) {\r
       gBS->UnloadImage(NewHandle);\r
     }\r
+    FreePool (NewCmdLine);\r
     return (Status);\r
   }\r
   Status = gBS->OpenProtocol(\r