summaryrefslogtreecommitdiff
path: root/ShellPkg/Application/Shell/ShellProtocol.c
diff options
context:
space:
mode:
authorEric Dong <eric.dong@intel.com>2014-06-26 01:38:46 +0000
committerydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524>2014-06-26 01:38:46 +0000
commit81cd2f536ef0097392b51f96405321ce7b01350c (patch)
treece44817456c749b0663e8fb845c9d91b8aefbce3 /ShellPkg/Application/Shell/ShellProtocol.c
parent45295cf5a58578b84e5092c3a3dd145c069c1db5 (diff)
downloadedk2-platforms-81cd2f536ef0097392b51f96405321ce7b01350c.tar.xz
Refine code to make it more safely.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Jaben Carsey <Jaben.carsey@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15593 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ShellPkg/Application/Shell/ShellProtocol.c')
-rw-r--r--ShellPkg/Application/Shell/ShellProtocol.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ShellPkg/Application/Shell/ShellProtocol.c b/ShellPkg/Application/Shell/ShellProtocol.c
index e4680139d0..3d01283b60 100644
--- a/ShellPkg/Application/Shell/ShellProtocol.c
+++ b/ShellPkg/Application/Shell/ShellProtocol.c
@@ -460,6 +460,7 @@ EfiShellGetFilePathFromDevicePath(
ASSERT((PathForReturn == NULL && PathSize == 0) || (PathForReturn != NULL));
AlignedNode = AllocateCopyPool (DevicePathNodeLength(FilePath), FilePath);
+ ASSERT (AlignedNode != NULL);
// File Path Device Path Nodes 'can optionally add a "\" separator to
// the beginning and/or the end of the Path Name string.'