]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
ensure variables are initialized
authorAlan T. DeKok <aland@freeradius.org>
Sun, 24 Jan 2021 12:51:19 +0000 (07:51 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Sun, 24 Jan 2021 12:51:19 +0000 (07:51 -0500)
src/bin/fuzzer.c

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