From d96c9e465abb291cb943a1b4ec3643de4b3f6423 Mon Sep 17 00:00:00 2001 From: Joe Shaw Date: Tue, 8 Mar 2005 20:45:03 +0000 Subject: 2005-03-08 Joe Shaw * dbus/dbus-connection.c (dbus_connection_send_with_reply): After we attach our pending call to the connection, unref it. Fixes a leak. * mono/Connection.cs (set_RawConnection): Disconnect our filter and match callbacks from the old connection and reconnect them to the new connection, if any. * mono/DBusType/Array.cs: "Code" is a static member, so don't use "this" to refer to it. Fix for stricter checking in Mono 1.1.4. * mono/DBusType/ObjectPath.cs (Append): Don't leak the object path that we pass into unmanaged code. * mono/DBusType/String.cs (Append): Don't leak the string that we pass into unmanged code. --- mono/DBusType/ObjectPath.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'mono/DBusType/ObjectPath.cs') diff --git a/mono/DBusType/ObjectPath.cs b/mono/DBusType/ObjectPath.cs index 01a21ca9..4f064d59 100644 --- a/mono/DBusType/ObjectPath.cs +++ b/mono/DBusType/ObjectPath.cs @@ -52,7 +52,10 @@ namespace DBus.DBusType { IntPtr marshalVal = Marshal.StringToHGlobalAnsi (Path); - if (!dbus_message_iter_append_basic (iter, (int) Code, ref marshalVal)) + bool success = dbus_message_iter_append_basic (iter, (int) Code, ref marshalVal); + Marshal.FreeHGlobal (marshalVal); + + if (!success) throw new ApplicationException("Failed to append OBJECT_PATH argument:" + val); } -- cgit