Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
// must split off the search part that applies to files from the end of the directory part\r
//\r
StrnCatGrow(&SearchString, NULL, FullPath, 0);\r
+ if (SearchString == NULL) {\r
+ FreePool (FullPath);\r
+ ShellCommandLineFreeVarList (Package);\r
+ return SHELL_OUT_OF_RESOURCES;\r
+ }\r
PathRemoveLastItem (FullPath);\r
CopyMem (SearchString, SearchString + StrLen (FullPath), StrSize (SearchString + StrLen (FullPath)));\r
}\r