summaryrefslogtreecommitdiffstats
path: root/src/journal/fuzz-journald-kmsg.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/journal/fuzz-journald-kmsg.c')
-rw-r--r--src/journal/fuzz-journald-kmsg.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/journal/fuzz-journald-kmsg.c b/src/journal/fuzz-journald-kmsg.c
index 104a9b3..1a19f50 100644
--- a/src/journal/fuzz-journald-kmsg.c
+++ b/src/journal/fuzz-journald-kmsg.c
@@ -5,16 +5,16 @@
#include "journald-kmsg.h"
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
- Server s;
+ _cleanup_(server_freep) Server *s = NULL;
if (size == 0)
return 0;
fuzz_setup_logging();
- dummy_server_init(&s, data, size);
- dev_kmsg_record(&s, s.buffer, size);
- server_done(&s);
+ assert_se(server_new(&s) >= 0);
+ dummy_server_init(s, data, size);
+ dev_kmsg_record(s, s->buffer, size);
return 0;
}