]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
logind: make sure we don't acces m->action_what if it's not initialized (#7475)
authorLennart Poettering <lennart@poettering.net>
Mon, 27 Nov 2017 07:15:07 +0000 (08:15 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 27 Nov 2017 07:15:07 +0000 (08:15 +0100)
Fixes: #7466
src/login/logind-dbus.c

index df14c9e7115d190b3d5414f454eda23f95f082c7..196d68bbfb78bec2d1d74817376145630c624827 100644 (file)
@@ -1601,7 +1601,7 @@ static int execute_shutdown_or_sleep(
 
 error:
         /* Tell people that they now may take a lock again */
-        send_prepare_for(m, m->action_what, false);
+        (void) send_prepare_for(m, w, false);
 
         return r;
 }
@@ -1712,7 +1712,7 @@ int bus_manager_shutdown_or_sleep_now_or_later(
         assert(!m->action_job);
 
         /* Tell everybody to prepare for shutdown/sleep */
-        send_prepare_for(m, w, true);
+        (void) send_prepare_for(m, w, true);
 
         delayed =
                 m->inhibit_delay_max > 0 &&
@@ -2767,7 +2767,7 @@ int match_job_removed(sd_bus_message *message, void *userdata, sd_bus_error *err
                 log_info("Operation '%s' finished.", inhibit_what_to_string(m->action_what));
 
                 /* Tell people that they now may take a lock again */
-                send_prepare_for(m, m->action_what, false);
+                (void) send_prepare_for(m, m->action_what, false);
 
                 m->action_job = mfree(m->action_job);
                 m->action_unit = NULL;