[mutter/halfline/wip/kms-cleanups: 2/9] native: get kms fd later in constructor
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/halfline/wip/kms-cleanups: 2/9] native: get kms fd later in constructor
- Date: Thu, 10 Mar 2016 21:12:12 +0000 (UTC)
commit 56578b597b432abc0d970fadeb618adc8b42e31a
Author: Ray Strode <rstrode redhat com>
Date: Fri Jan 8 12:38:45 2016 -0500
native: get kms fd later in constructor
This will make it easier to move it out to a separate file
in a subsequent commit.
src/backends/native/meta-session-controller.c | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/src/backends/native/meta-session-controller.c b/src/backends/native/meta-session-controller.c
index 72b8a2e..65c3d09 100644
--- a/src/backends/native/meta-session-controller.c
+++ b/src/backends/native/meta-session-controller.c
@@ -455,17 +455,17 @@ meta_session_controller_new (GError **error)
if (!seat_proxy)
goto fail;
- if (!get_kms_fd (session_proxy, seat_id, &kms_fd, error))
- goto fail;
-
- free (seat_id);
-
self = g_slice_new0 (MetaSessionController);
self->session_proxy = session_proxy;
self->seat_proxy = seat_proxy;
self->session_active = TRUE;
+ if (!get_kms_fd (session_proxy, seat_id, &kms_fd, error))
+ goto fail;
+
+ free (seat_id);
+
clutter_egl_set_kms_fd (kms_fd);
clutter_evdev_set_device_callbacks (on_evdev_device_open,
on_evdev_device_close,
@@ -479,6 +479,10 @@ meta_session_controller_new (GError **error)
login1_session_call_release_control_sync (session_proxy, NULL, NULL);
g_clear_object (&session_proxy);
g_clear_object (&seat_proxy);
+
+ if (self)
+ g_slice_free (MetaSessionController, self);
+
free (seat_id);
return NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]