summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/login/logind-session-dbus.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/login/logind-session-dbus.c b/src/login/logind-session-dbus.c
index 8a95fc7c7..0e2cde727 100644
--- a/src/login/logind-session-dbus.c
+++ b/src/login/logind-session-dbus.c
@@ -708,9 +708,7 @@ int session_send_create_reply(Session *s, sd_bus_error *error) {
return 0;
#endif // 0
- c = s->create_message;
- s->create_message = NULL;
-
+ c = TAKE_PTR(s->create_message);
if (error)
return sd_bus_reply_method_error(c, error);