]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
main: make sure the ambient caps set is valid in case we fail to read it 34092/head
authorLennart Poettering <lennart@poettering.net>
Thu, 22 Aug 2024 16:36:23 +0000 (18:36 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 22 Aug 2024 16:36:59 +0000 (18:36 +0200)
We ignore failures when reading this after all. Hence we better leave
the memory properly initialized.

src/core/main.c

index 6e1219eddb4af45fa68c820fcb5485cd0a0b7f55..14c124dc32c861d8eae233b16fecc898dd0cb9c9 100644 (file)
@@ -3013,7 +3013,7 @@ int main(int argc, char *argv[]) {
         usec_t before_startup, after_startup;
         static char systemd[] = "systemd";
         const char *error_message = NULL;
-        uint64_t saved_ambient_set;
+        uint64_t saved_ambient_set = 0;
         int r, retval = EXIT_FAILURE;
         Manager *m = NULL;
         FDSet *fds = NULL;