fix leaks in fuzz tests

This commit is contained in:
moneromooo-monero 2020-06-14 12:48:47 +00:00
parent 38ca1bb389
commit c4df8b1390
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3
4 changed files with 34 additions and 17 deletions

View file

@ -66,8 +66,12 @@ extern "C" { \
catch (const std::exception &e) \
{ \
fprintf(stderr, "Exception: %s\n", e.what()); \
return 1; \
delete el::base::elStorage; \
el::base::elStorage = NULL; \
return 0; \
} \
delete el::base::elStorage; \
el::base::elStorage = NULL; \
return 0; \
} \
}
@ -122,8 +126,12 @@ int run_fuzzer(int argc, const char **argv, Fuzzer &fuzzer);
catch (const std::exception &e) \
{ \
fprintf(stderr, "Exception: %s\n", e.what()); \
return 1; \
delete el::base::elStorage; \
el::base::elStorage = NULL; \
return 0; \
} \
delete el::base::elStorage; \
el::base::elStorage = NULL; \
return 0; \
} \
}; \