X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Flogin%2Flogind-seat-dbus.c;h=230f7f082a21619f17d437f08dc519ab352d2b8c;hb=9209d5121dfb3049cbf280139c4cc40c2038edcc;hp=82f25a0d1cfeb8694a94caf2f4958386d8204d19;hpb=4654e558a3c297a71f05c3b2db6a2744fcf3cdea;p=elogind.git diff --git a/src/login/logind-seat-dbus.c b/src/login/logind-seat-dbus.c index 82f25a0d1..230f7f082 100644 --- a/src/login/logind-seat-dbus.c +++ b/src/login/logind-seat-dbus.c @@ -61,7 +61,7 @@ static int bus_seat_append_active(DBusMessageIter *i, const char *property, void DBusMessageIter sub; Seat *s = data; const char *id, *path; - char _cleanup_free_ *p = NULL; + _cleanup_free_ char *p = NULL; assert(i); assert(property); @@ -104,7 +104,7 @@ static int bus_seat_append_sessions(DBusMessageIter *i, const char *property, vo return -ENOMEM; LIST_FOREACH(sessions_by_seat, session, s->sessions) { - char _cleanup_free_ *p = NULL; + _cleanup_free_ char *p = NULL; if (!dbus_message_iter_open_container(&sub, DBUS_TYPE_STRUCT, NULL, &sub2)) return -ENOMEM; @@ -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) { - char _cleanup_free_ *t; + _cleanup_free_ char *t = NULL; assert(s);