signed-off-by: jcarsey
reviewed-by: darylm503
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12393
6f19259b-4bc3-4df7-8a09-
765794883524
**/\r
\r
#include <Uefi.h>\r
+#include <ShellBase.h>\r
\r
#include <Protocol/UnicodeCollation.h>\r
#include <Protocol/DevicePath.h>\r
FALSE,\r
FALSE);\r
\r
- RetVal = mUnicodeCollation->StriColl(\r
- mUnicodeCollation,\r
- TextPath1,\r
- TextPath2);\r
+ if (TextPath1 == NULL) {\r
+ RetVal = -1;\r
+ } else if (TextPath2 == NULL) {\r
+ RetVal = 1;\r
+ } else {\r
+ RetVal = mUnicodeCollation->StriColl(\r
+ mUnicodeCollation,\r
+ TextPath1,\r
+ TextPath2);\r
+ }\r
\r
- FreePool(TextPath1);\r
- FreePool(TextPath2);\r
+ SHELL_FREE_NON_NULL(TextPath1);\r
+ SHELL_FREE_NON_NULL(TextPath2);\r
\r
return (RetVal);\r
}\r