seat: unref session after unregistration

Session registration does not provide a reference to the caller. Instead,
the seat itself owns the reference. Hence, we must clear this reference
during unregistration, otherwise we will never free the session structure.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit is contained in:
David Herrmann 2012-12-02 13:39:00 +01:00
parent 5d94e9eb48
commit 24d320b86a

View File

@ -1000,6 +1000,7 @@ void kmscon_session_unregister(struct kmscon_session *sess)
sess->seat = NULL;
session_call(sess, KMSCON_SESSION_UNREGISTER, NULL);
kmscon_session_unref(sess);
/* If this session was active and we couldn't deactivate it, then it
* might still have resources allocated that couldn't get freed. In this