X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fjournal%2Fjournal-remote.c;h=4ece14ee777b9ce9138cc6bfc0fabf851c2ea827;hp=6d7ba6caa06e137ee0aae58d16b016702d9a24c5;hb=3d94f76c99da13e5603831d0b278f8c8c21bcb02;hpb=8a8d55f2c104cf99efe5f244fc4857a15e9f60de diff --git a/src/journal/journal-remote.c b/src/journal/journal-remote.c index 6d7ba6caa..4ece14ee7 100644 --- a/src/journal/journal-remote.c +++ b/src/journal/journal-remote.c @@ -89,7 +89,7 @@ static int spawn_child(const char* child, char** argv) { if (child_pid < 0) { r = -errno; log_error("Failed to fork: %m"); - close_pipe(fd); + safe_close_pair(fd); return r; } @@ -101,9 +101,7 @@ static int spawn_child(const char* child, char** argv) { _exit(EXIT_FAILURE); } - r = close_pipe(fd); - if (r < 0) - log_warning("Failed to close pipe fds: %m"); + safe_close_pair(fd); /* Make sure the child goes away when the parent dies */ if (prctl(PR_SET_PDEATHSIG, SIGTERM) < 0) @@ -142,7 +140,7 @@ static int spawn_curl(char* url) { static int spawn_getter(char *getter, char *url) { int r; - char _cleanup_strv_free_ **words = NULL, **words2 = NULL; + char _cleanup_strv_free_ **words = NULL; assert(getter); words = strv_split_quoted(getter);