From: Alan T. DeKok Date: Sun, 24 Jan 2021 12:45:37 +0000 (-0500) Subject: clear errors after every run. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0b255bdab54509ce5dd19d60a767bc3b5a15d092;p=thirdparty%2Ffreeradius-server.git clear errors after every run. --- diff --git a/src/bin/fuzzer.c b/src/bin/fuzzer.c index e8535570a0..b924b16b5c 100644 --- a/src/bin/fuzzer.c +++ b/src/bin/fuzzer.c @@ -193,5 +193,12 @@ int LLVMFuzzerTestOneInput(const uint8_t *buf, size_t len) talloc_free(ctx); fr_strerror(); /* Clear any undrained errors */ + /* + * Clear error messages from the run. Clearing these + * keeps malloc/free balanced, which helps to avoid the + * fuzzers leak heuristics from firing. + */ + fr_strerror_const(NULL); + return 0; }