summaryrefslogtreecommitdiff
path: root/src/login/logind-seat-dbus.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/login/logind-seat-dbus.c')
-rw-r--r--src/login/logind-seat-dbus.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/login/logind-seat-dbus.c b/src/login/logind-seat-dbus.c
index 5c535ba0ec..230f7f082a 100644
--- a/src/login/logind-seat-dbus.c
+++ b/src/login/logind-seat-dbus.c
@@ -209,8 +209,8 @@ static int bus_seat_append_idle_hint_since(DBusMessageIter *i, const char *prope
}
static int get_seat_for_path(Manager *m, const char *path, Seat **_s) {
+ _cleanup_free_ char *id = NULL;
Seat *s;
- char *id;
assert(m);
assert(path);
@@ -224,8 +224,6 @@ static int get_seat_for_path(Manager *m, const char *path, Seat **_s) {
return -ENOMEM;
s = hashmap_get(m->seats, id);
- free(id);
-
if (!s)
return -ENOENT;
@@ -348,7 +346,7 @@ const DBusObjectPathVTable bus_seat_vtable = {
};
char *seat_bus_path(Seat *s) {
- _cleanup_free_ char *t;
+ _cleanup_free_ char *t = NULL;
assert(s);