chiark / gitweb /
locale: make sure that l is freed
[elogind.git] / src / journal / journal-vacuum.c
index c89014653784d88e5634dc27a6d07ec8966ef7a8..ac16bdfcfd4890fbe603ebe38d572ec9ca4ba03c 100644 (file)
@@ -86,7 +86,8 @@ int journal_directory_vacuum(const char *directory, uint64_t max_use, uint64_t m
 
         for (;;) {
                 int k;
-                struct dirent buf, *de;
+                struct dirent *de;
+                union dirent_storage buf;
                 size_t q;
                 struct stat st;
                 char *p;
@@ -94,7 +95,7 @@ int journal_directory_vacuum(const char *directory, uint64_t max_use, uint64_t m
                 sd_id128_t seqnum_id;
                 bool have_seqnum;
 
-                k = readdir_r(d, &buf, &de);
+                k = readdir_r(d, &buf.de, &de);
                 if (k != 0) {
                         r = -k;
                         goto finish;