aboutsummaryrefslogtreecommitdiff
path: root/fuzz/client.cc
diff options
context:
space:
mode:
authorDavid Benjamin <davidben@google.com>2016-10-13 19:03:17 -0400
committerAdam Langley <agl@google.com>2016-10-13 23:20:40 +0000
commit4c0e6c64b6866926f96576bc8e8ea8849f018159 (patch)
tree54a84f6412375102e013ea0ff0735fa5b611de36 /fuzz/client.cc
parent1991af69006a8fe4faf9b80b2340688846e62514 (diff)
downloadboringssl-4c0e6c64b6866926f96576bc8e8ea8849f018159.zip
boringssl-4c0e6c64b6866926f96576bc8e8ea8849f018159.tar.gz
boringssl-4c0e6c64b6866926f96576bc8e8ea8849f018159.tar.bz2
ERR_clear_error at the end of each fuzzer.
Data allocated in one fuzzer iteration and then freed in the next complicates the leak checker. Avoid this by dropping hidden global state at the end of each run. Change-Id: Ice79704f2754a6b1f40e288df9b97ddd5b3b97d5 Reviewed-on: https://boringssl-review.googlesource.com/11600 Commit-Queue: David Benjamin <davidben@google.com> Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'fuzz/client.cc')
-rw-r--r--fuzz/client.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/fuzz/client.cc b/fuzz/client.cc
index ed2daee..bd0d8fa 100644
--- a/fuzz/client.cc
+++ b/fuzz/client.cc
@@ -15,6 +15,7 @@
#include <assert.h>
#include <openssl/bio.h>
+#include <openssl/err.h>
#include <openssl/evp.h>
#include <openssl/rand.h>
#include <openssl/rsa.h>
@@ -290,5 +291,6 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *buf, size_t len) {
}
SSL_free(client);
+ ERR_clear_error();
return 0;
}