ocvalidate: Simply return non-zero on errors

This commit is contained in:
PMheart 2021-02-03 08:12:59 +08:00
parent 1d74b6fa3e
commit cb5f497a04

View File

@ -114,6 +114,10 @@ int ENTRY_POINT(int argc, const char *argv[]) {
//
DEBUG ((DEBUG_ERROR, "\n"));
ErrorCount = CheckConfig (&Config);
OcConfigurationFree (&Config);
FreePool (ConfigFileBuffer);
if (ErrorCount == 0) {
DEBUG ((
DEBUG_ERROR,
@ -130,12 +134,11 @@ int ENTRY_POINT(int argc, const char *argv[]) {
ErrorCount,
ErrorCount > 1 ? "errors" : "error"
));
return EXIT_FAILURE;
}
OcConfigurationFree (&Config);
FreePool (ConfigFileBuffer);
return ErrorCount;
return 0;
}
INT32 LLVMFuzzerTestOneInput(CONST UINT8 *Data, UINTN Size) {