diff options
author | jcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-10-04 16:24:30 +0000 |
---|---|---|
committer | jcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-10-04 16:24:30 +0000 |
commit | 3c865f2064d37eaccd1693b878596d5138b0b38e (patch) | |
tree | ffe10112e71c18c5c4ec56f37cc670258b22fd5b /ShellPkg/Application/Shell/FileHandleWrappers.c | |
parent | aca84419c4b5128b69215b8f6e4d34c36efb1fbc (diff) | |
download | edk2-platforms-3c865f2064d37eaccd1693b878596d5138b0b38e.tar.xz |
1) Removing ASSERTs for proper return values.
2) Verifying that memory allocations were successful.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10904 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ShellPkg/Application/Shell/FileHandleWrappers.c')
-rw-r--r-- | ShellPkg/Application/Shell/FileHandleWrappers.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ShellPkg/Application/Shell/FileHandleWrappers.c b/ShellPkg/Application/Shell/FileHandleWrappers.c index 02e42e3c9d..ee13d0cb73 100644 --- a/ShellPkg/Application/Shell/FileHandleWrappers.c +++ b/ShellPkg/Application/Shell/FileHandleWrappers.c @@ -1406,7 +1406,7 @@ FileInterfaceMemClose( )
{
SHELL_FREE_NON_NULL(((EFI_FILE_PROTOCOL_MEM*)This)->Buffer);
- SHELL_FREE_NON_NULL((EFI_FILE_PROTOCOL_MEM*)This);
+ SHELL_FREE_NON_NULL(This);
return (EFI_SUCCESS);
}
@@ -1553,6 +1553,9 @@ CreateFileInterfaceFile( EFI_FILE_PROTOCOL_FILE *NewOne;
NewOne = AllocatePool(sizeof(EFI_FILE_PROTOCOL_FILE));
+ if (NewOne == NULL) {
+ return (NULL);
+ }
CopyMem(NewOne, Template, sizeof(EFI_FILE_PROTOCOL_FILE));
NewOne->Orig = (EFI_FILE_PROTOCOL *)Template;
NewOne->Unicode = Unicode;
|