fix function was exited without releasing (#1389)
* Update jsoncheck.cpp * Update minefieldcheck.cpp * Update jsoncheck.cpp * Update minefieldcheck.cpp
This commit is contained in:
parent
3b8486665a
commit
84b0e84447
|
@ -65,6 +65,8 @@ bool validate(const char *dirname) {
|
||||||
auto error = simdjson::padded_string::load(fullpath).get(p);
|
auto error = simdjson::padded_string::load(fullpath).get(p);
|
||||||
if (error) {
|
if (error) {
|
||||||
std::cerr << "Could not load the file " << fullpath << std::endl;
|
std::cerr << "Could not load the file " << fullpath << std::endl;
|
||||||
|
free(fullpath);
|
||||||
|
delete[] is_file_as_expected;
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
simdjson::dom::parser parser;
|
simdjson::dom::parser parser;
|
||||||
|
|
|
@ -63,6 +63,8 @@ bool validate_minefield(const char *dirname) {
|
||||||
auto error = simdjson::padded_string::load(fullpath).get(p);
|
auto error = simdjson::padded_string::load(fullpath).get(p);
|
||||||
if (error) {
|
if (error) {
|
||||||
std::cerr << "Could not load the file " << fullpath << std::endl;
|
std::cerr << "Could not load the file " << fullpath << std::endl;
|
||||||
|
free(fullpath);
|
||||||
|
delete[] is_file_as_expected;
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
simdjson::dom::parser parser;
|
simdjson::dom::parser parser;
|
||||||
|
|
Loading…
Reference in New Issue