summaryrefslogtreecommitdiff
path: root/src/login
diff options
context:
space:
mode:
Diffstat (limited to 'src/login')
-rw-r--r--src/login/logind-dbus.c3
-rw-r--r--src/login/logind-inhibit.c3
-rw-r--r--src/login/logind-session.c3
-rw-r--r--src/login/logind-user.c3
4 files changed, 4 insertions, 8 deletions
diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c
index b6fa50aa52..050d0252ad 100644
--- a/src/login/logind-dbus.c
+++ b/src/login/logind-dbus.c
@@ -1987,8 +1987,7 @@ static int method_cancel_scheduled_shutdown(sd_bus_message *message, void *userd
m->scheduled_shutdown_timeout_source = sd_event_source_unref(m->scheduled_shutdown_timeout_source);
m->wall_message_timeout_source = sd_event_source_unref(m->wall_message_timeout_source);
m->nologin_timeout_source = sd_event_source_unref(m->nologin_timeout_source);
- free(m->scheduled_shutdown_type);
- m->scheduled_shutdown_type = NULL;
+ m->scheduled_shutdown_type = mfree(m->scheduled_shutdown_type);
m->scheduled_shutdown_timeout = 0;
if (m->unlink_nologin) {
diff --git a/src/login/logind-inhibit.c b/src/login/logind-inhibit.c
index cfae186edd..0c9c1e5e97 100644
--- a/src/login/logind-inhibit.c
+++ b/src/login/logind-inhibit.c
@@ -333,8 +333,7 @@ void inhibitor_remove_fifo(Inhibitor *i) {
if (i->fifo_path) {
unlink(i->fifo_path);
- free(i->fifo_path);
- i->fifo_path = NULL;
+ i->fifo_path = mfree(i->fifo_path);
}
}
diff --git a/src/login/logind-session.c b/src/login/logind-session.c
index 92a6027a7e..d2c5a29801 100644
--- a/src/login/logind-session.c
+++ b/src/login/logind-session.c
@@ -913,8 +913,7 @@ static void session_remove_fifo(Session *s) {
if (s->fifo_path) {
unlink(s->fifo_path);
- free(s->fifo_path);
- s->fifo_path = NULL;
+ s->fifo_path = mfree(s->fifo_path);
}
}
diff --git a/src/login/logind-user.c b/src/login/logind-user.c
index 5d8a7571cd..f2c89e3653 100644
--- a/src/login/logind-user.c
+++ b/src/login/logind-user.c
@@ -560,8 +560,7 @@ static int user_remove_runtime_path(User *u) {
if (r < 0)
log_error_errno(r, "Failed to remove runtime directory %s: %m", u->runtime_path);
- free(u->runtime_path);
- u->runtime_path = NULL;
+ u->runtime_path = mfree(u->runtime_path);
return r;
}