chiark / gitweb /
logind: introduce session-devices
[elogind.git] / src / login / logind-device.c
index 2bcd6a1..95c2307 100644 (file)
@@ -67,11 +67,15 @@ void device_free(Device *d) {
 
 void device_detach(Device *d) {
         Seat *s;
+        SessionDevice *sd;
         assert(d);
 
         if (!d->seat)
                 return;
 
+        while ((sd = d->session_devices))
+                session_device_free(sd);
+
         s = d->seat;
         LIST_REMOVE(Device, devices, d->seat->devices, d);
         d->seat = NULL;