diff options
author | jcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-10-17 17:49:21 +0000 |
---|---|---|
committer | jcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-10-17 17:49:21 +0000 |
commit | c8c2259156709f1995994dadbf469a8920649bc8 (patch) | |
tree | 580e9b8baf71c878fe185452451c7685023568c9 /ShellPkg/Application/Shell/ShellProtocol.c | |
parent | 532691c8ba90e5022174503ab0781322c6f79cab (diff) | |
download | edk2-platforms-c8c2259156709f1995994dadbf469a8920649bc8.tar.xz |
ShellPkg: Add checking for memory allocation and pointer returns from functions.
signed-off-by: jcarsey
reviewed-by: lgrosenb
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12542 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ShellPkg/Application/Shell/ShellProtocol.c')
-rw-r--r-- | ShellPkg/Application/Shell/ShellProtocol.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/ShellPkg/Application/Shell/ShellProtocol.c b/ShellPkg/Application/Shell/ShellProtocol.c index 6b81918101..00bbc358fa 100644 --- a/ShellPkg/Application/Shell/ShellProtocol.c +++ b/ShellPkg/Application/Shell/ShellProtocol.c @@ -2249,9 +2249,7 @@ EfiShellFindFiles( MapName = StrnCatGrow(&MapName, NULL, PatternCopy, Count);
if (MapName == NULL) {
Status = EFI_OUT_OF_RESOURCES;
- }
-
- if (!EFI_ERROR(Status)) {
+ } else {
RootDevicePath = EfiShellGetDevicePathFromFilePath(PatternCopy);
if (RootDevicePath == NULL) {
Status = EFI_INVALID_PARAMETER;
|