chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tmpfiles: add new "C" line for copying files or directories
[elogind.git]
/
src
/
journal
/
journalctl.c
diff --git
a/src/journal/journalctl.c
b/src/journal/journalctl.c
index 0619b256b9598a6685eb7205126d4eb7abbd9e90..86453e65c8f9b8c8e362339fba115be1ec50f5b0 100644
(file)
--- a/
src/journal/journalctl.c
+++ b/
src/journal/journalctl.c
@@
-1290,7
+1290,7
@@
static int setup_keys(void) {
n = now(CLOCK_REALTIME);
n /= arg_interval;
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);
fd = mkostemp_safe(k, O_WRONLY|O_CLOEXEC);
if (fd < 0) {
log_error("Failed to open %s: %m", k);
@@
-1389,8
+1389,7
@@
static int setup_keys(void) {
r = 0;
finish:
r = 0;
finish:
- if (fd >= 0)
- close_nointr_nofail(fd);
+ safe_close(fd);
if (k) {
unlink(k);
if (k) {
unlink(k);
@@
-1938,5
+1937,7
@@
int main(int argc, char *argv[]) {
finish:
pager_close();
finish:
pager_close();
+ strv_free(arg_file);
+
return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS;
}
return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS;
}