[gnome-flashback] idle-monitor: do not generate object manager
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-flashback] idle-monitor: do not generate object manager
- Date: Tue, 16 Mar 2021 20:43:12 +0000 (UTC)
commit 41b802ddb0922560ef4d7cb8bb2a6bc819cb7baa
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Tue Mar 16 18:34:57 2021 +0200
idle-monitor: do not generate object manager
Generated MetaDBusObjectManagerClient is not used and
MetaDBusObjectSkeleton can be replaced with GDBusObjectSkeleton.
This will remove false positive defect about use after free in
meta_dbus_object_peek_idle_monitor.
Coverity CID: #1502696
gnome-flashback/libidle-monitor/Makefile.am | 1 -
gnome-flashback/libidle-monitor/flashback-idle-monitor.c | 9 +++++----
2 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/gnome-flashback/libidle-monitor/Makefile.am b/gnome-flashback/libidle-monitor/Makefile.am
index 4c6e9d3..a9dd980 100644
--- a/gnome-flashback/libidle-monitor/Makefile.am
+++ b/gnome-flashback/libidle-monitor/Makefile.am
@@ -44,7 +44,6 @@ meta-dbus-idle-monitor.c: org.gnome.Mutter.IdleMonitor.xml
--interface-prefix org.gnome.Mutter \
--c-namespace MetaDBus \
--generate-c-code meta-dbus-idle-monitor \
- --c-generate-object-manager \
$(srcdir)/org.gnome.Mutter.IdleMonitor.xml
BUILT_SOURCES = \
diff --git a/gnome-flashback/libidle-monitor/flashback-idle-monitor.c
b/gnome-flashback/libidle-monitor/flashback-idle-monitor.c
index ce30bda..5633b99 100644
--- a/gnome-flashback/libidle-monitor/flashback-idle-monitor.c
+++ b/gnome-flashback/libidle-monitor/flashback-idle-monitor.c
@@ -196,7 +196,7 @@ create_monitor_skeleton (GDBusObjectManagerServer *server,
const gchar *path)
{
MetaDBusIdleMonitor *skeleton;
- MetaDBusObjectSkeleton *object;
+ GDBusObjectSkeleton *object;
skeleton = meta_dbus_idle_monitor_skeleton_new ();
g_signal_connect_object (skeleton, "handle-add-idle-watch",
@@ -208,10 +208,11 @@ create_monitor_skeleton (GDBusObjectManagerServer *server,
g_signal_connect_object (skeleton, "handle-get-idletime",
G_CALLBACK (handle_get_idletime), monitor, 0);
- object = meta_dbus_object_skeleton_new (path);
- meta_dbus_object_skeleton_set_idle_monitor (object, skeleton);
+ object = g_dbus_object_skeleton_new (path);
+ g_dbus_object_skeleton_add_interface (object,
+ G_DBUS_INTERFACE_SKELETON (skeleton));
- g_dbus_object_manager_server_export (server, G_DBUS_OBJECT_SKELETON (object));
+ g_dbus_object_manager_server_export (server, object);
g_object_unref (skeleton);
g_object_unref (object);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]