diff --git a/src/systemctl/fuzz-systemctl-parse-argv.c b/src/systemctl/fuzz-systemctl-parse-argv.c index cf66fa4bb7..31269863c1 100644 --- a/src/systemctl/fuzz-systemctl-parse-argv.c +++ b/src/systemctl/fuzz-systemctl-parse-argv.c @@ -6,6 +6,8 @@ #include "env-util.h" #include "fd-util.h" #include "fuzz.h" +#include "selinux-util.h" +#include "static-destruct.h" #include "stdio-util.h" #include "strv.h" #include "systemctl.h" @@ -57,5 +59,12 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { release_busses(); /* We open the bus for communication with logind. * It needs to be closed to avoid apparent leaks. */ + + mac_selinux_finish(); + + /* Call static destructors to do global state cleanup. We do it here, and not in fuzz-main.c so that + * any global state is destoyed between fuzzer runs. */ + static_destruct(); + return 0; } diff --git a/test/fuzz/fuzz-systemctl-parse-argv/missing-strv-free.input b/test/fuzz/fuzz-systemctl-parse-argv/missing-strv-free.input new file mode 100644 index 0000000000..5600f4fd00 Binary files /dev/null and b/test/fuzz/fuzz-systemctl-parse-argv/missing-strv-free.input differ