From 24d320b86aa1a909432b2a5dca922f22e24363b2 Mon Sep 17 00:00:00 2001 From: David Herrmann Date: Sun, 2 Dec 2012 13:39:00 +0100 Subject: [PATCH] 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 --- src/kmscon_seat.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/kmscon_seat.c b/src/kmscon_seat.c index e8b554a..b897b95 100644 --- a/src/kmscon_seat.c +++ b/src/kmscon_seat.c @@ -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