n = now(CLOCK_REALTIME);
n /= arg_interval;
- close_nointr_nofail(fd);
+ safe_close(fd);
fd = mkostemp_safe(k, O_WRONLY|O_CLOEXEC);
if (fd < 0) {
log_error("Failed to open %s: %m", k);
r = 0;
finish:
- if (fd >= 0)
- close_nointr_nofail(fd);
+ safe_close(fd);
if (k) {
unlink(k);
finish:
pager_close();
+ strv_free(arg_file);
+
return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS;
}