From 2e9749e887b82c8b491a510f6308c07e5c9e6ed2 Mon Sep 17 00:00:00 2001 From: "Alan T. DeKok" Date: Sun, 24 Jan 2021 07:51:19 -0500 Subject: [PATCH] ensure variables are initialized --- src/bin/fuzzer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bin/fuzzer.c b/src/bin/fuzzer.c index b924b16b5c..fd7ef7c673 100644 --- a/src/bin/fuzzer.c +++ b/src/bin/fuzzer.c @@ -41,7 +41,7 @@ static void *decode_ctx = NULL; static fr_test_point_proto_decode_t *tp = NULL; static fr_dict_t *dict = NULL; -static dl_t *dl; +static dl_t *dl = NULL; static dl_loader_t *dl_loader; int LLVMFuzzerInitialize(int *argc, char ***argv); @@ -49,7 +49,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *buf, size_t len); static void exitHandler() { - if (dl->handle) { + if (dl && dl->handle) { dlclose(dl->handle); dl->handle = NULL; } -- 2.47.2