]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
clear errors after every run.
authorAlan T. DeKok <aland@freeradius.org>
Sun, 24 Jan 2021 12:45:37 +0000 (07:45 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Sun, 24 Jan 2021 12:46:14 +0000 (07:46 -0500)
src/bin/fuzzer.c

index e8535570a06c6dc2763488342b69652cad2a3dab..b924b16b5cc43861ee7e89d0b5b9d86bd4e3c70b 100644 (file)
@@ -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;
 }