]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/coredump/coredump-vacuum.c
tree-wide: use TAKE_PTR() and TAKE_FD() macros
[thirdparty/systemd.git] / src / coredump / coredump-vacuum.c
index e27512167c2647daf14bd2ac6eeea02e9b2273be..d7ecf85bbf3160174503541abb736cfa06463820 100644 (file)
@@ -227,8 +227,7 @@ int coredump_vacuum(int exclude_fd, uint64_t keep_free, uint64_t max_use) {
                                 if (r < 0)
                                         return log_oom();
 
-                                c = n;
-                                n = NULL;
+                                c = TAKE_PTR(n);
                         }
 
                         c->n_files++;