summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-09-23 01:05:55 +0200
committerLennart Poettering <lennart@poettering.net>2015-09-29 21:08:37 +0200
commit2feceb5eb945d430999a8130e14c512af35b21d9 (patch)
tree031cf145e6e48fd42a3459ef5a1298b86d27eac4 /src/core
parent3dfc97634ea1e9bdd075e93c90cc9a6879264e71 (diff)
tree-wide: take benefit of the fact that fdset_free() returns NULL
Diffstat (limited to 'src/core')
-rw-r--r--src/core/main.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/src/core/main.c b/src/core/main.c
index 3ba92e1779..815dbe7bd4 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -1632,8 +1632,7 @@ int main(int argc, char *argv[]) {
/* This will close all file descriptors that were opened, but
* not claimed by any unit. */
- fdset_free(fds);
- fds = NULL;
+ fds = fdset_free(fds);
arg_serialization = safe_fclose(arg_serialization);
@@ -1880,11 +1879,7 @@ finish:
* but let's hope that doesn't matter.) */
arg_serialization = safe_fclose(arg_serialization);
-
- if (fds) {
- fdset_free(fds);
- fds = NULL;
- }
+ fds = fdset_free(fds);
/* Reopen the console */
make_console_stdio();
@@ -1920,11 +1915,7 @@ finish:
}
arg_serialization = safe_fclose(arg_serialization);
-
- if (fds) {
- fdset_free(fds);
- fds = NULL;
- }
+ fds = fdset_free(fds);
#ifdef HAVE_VALGRIND_VALGRIND_H
/* If we are PID 1 and running under valgrind, then let's exit