UINT32 i;\r
\r
mText = malloc (WNDSIZ * 2 + MAXMATCH);\r
+ if (mText == NULL) {\r
+ return EFI_OUT_OF_RESOURCES;\r
+ }\r
for (i = 0 ; i < WNDSIZ * 2 + MAXMATCH; i ++) {\r
mText[i] = 0;\r
}\r
mParent = malloc (WNDSIZ * 2 * sizeof(*mParent));\r
mPrev = malloc (WNDSIZ * 2 * sizeof(*mPrev));\r
mNext = malloc ((MAX_HASH_VAL + 1) * sizeof(*mNext));\r
+ if (mLevel == NULL || mChildCount == NULL || mPosition == NULL ||\r
+ mParent == NULL || mPrev == NULL || mNext == NULL) {\r
+ return EFI_OUT_OF_RESOURCES;\r
+ }\r
\r
mBufSiz = 16 * 1024U;\r
while ((mBuf = malloc(mBufSiz)) == NULL) {\r