diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2020-06-14 12:48:47 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2020-06-14 12:54:13 +0000 |
commit | c4df8b1390da6b59f9d410a10905b2face807b00 (patch) | |
tree | 223386b1ffc3e4a9fc6b66b1b291a6a0d20f4be1 /tests/fuzz/fuzzer.h | |
parent | fuzz_tests: add a tx extra fuzz test (diff) | |
download | monero-c4df8b1390da6b59f9d410a10905b2face807b00.tar.xz |
fix leaks in fuzz tests
Diffstat (limited to 'tests/fuzz/fuzzer.h')
-rw-r--r-- | tests/fuzz/fuzzer.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/fuzz/fuzzer.h b/tests/fuzz/fuzzer.h index 2d0a29dfc..fac7e474a 100644 --- a/tests/fuzz/fuzzer.h +++ b/tests/fuzz/fuzzer.h @@ -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; \ } \ }; \ |