[Libreoffice-commits] core.git: vcl/unx
Matthew J. Francis
mjay.francis at gmail.com
Sun Sep 28 10:41:15 PDT 2014
vcl/unx/gtk/window/hudawareness.cxx | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
New commits:
commit 612f29ce1c86beba81934451dbc1009124dac5a8
Author: Matthew J. Francis <mjay.francis at gmail.com>
Date: Mon Sep 29 00:39:33 2014 +0800
Avoid leaking dbus objects
Change-Id: Ifb6a7bb3867bba293fd256c87998528a90053507
Reviewed-on: https://gerrit.libreoffice.org/11678
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/vcl/unx/gtk/window/hudawareness.cxx b/vcl/unx/gtk/window/hudawareness.cxx
index 1f2e56f..866c1b1 100644
--- a/vcl/unx/gtk/window/hudawareness.cxx
+++ b/vcl/unx/gtk/window/hudawareness.cxx
@@ -56,6 +56,7 @@ hud_awareness_register (GDBusConnection *connection,
GError **error)
{
static GDBusInterfaceInfo *iface;
+ static GDBusNodeInfo *info;
GDBusInterfaceVTable vtable;
HudAwarenessHandle *handle;
guint object_id;
@@ -66,7 +67,6 @@ hud_awareness_register (GDBusConnection *connection,
if G_UNLIKELY (iface == NULL)
{
GError *local_error = NULL;
- GDBusNodeInfo *info;
info = g_dbus_node_info_new_for_xml ("<node>"
"<interface name='com.canonical.hud.Awareness'>"
@@ -82,13 +82,13 @@ hud_awareness_register (GDBusConnection *connection,
g_assert (iface != NULL);
}
- handle = g_slice_new (HudAwarenessHandle);
+ handle = (HudAwarenessHandle*) g_malloc (sizeof (HudAwarenessHandle));
- object_id = g_dbus_connection_register_object (connection, object_path, iface, &vtable, handle, NULL, error);
+ object_id = g_dbus_connection_register_object (connection, object_path, iface, &vtable, handle, &g_free, error);
if (object_id == 0)
{
- g_slice_free (HudAwarenessHandle, handle);
+ g_free (handle);
return 0;
}
More information about the Libreoffice-commits
mailing list