diff --git a/src/journal/test-journal-flush.c b/src/journal/test-journal-flush.c index 914ca0b4d1d..2d4f531e9bf 100644 --- a/src/journal/test-journal-flush.c +++ b/src/journal/test-journal-flush.c @@ -27,8 +27,8 @@ #include "journal-internal.h" int main(int argc, char *argv[]) { - - char dn[] = "/var/tmp/test-journal-flush.XXXXXX", *fn; + _cleanup_free_ char *fn = NULL; + char dn[] = "/var/tmp/test-journal-flush.XXXXXX"; JournalFile *new_journal = NULL; sd_journal *j = NULL; unsigned n = 0;