Commit c1d5ce94 authored by Michael Albinus's avatar Michael Albinus

* dbusbind.c (xd_initialize, Fdbus_call_method, xd_read_message)

(Fdbus_register_signal, Fdbus_register_method): Cleanup memory of
error flag.
parent 93c3eb7c
2009-07-08 Michael Albinus <michael.albinus@gmx.de>
* dbusbind.c (xd_initialize, Fdbus_call_method, xd_read_message)
(Fdbus_register_signal, Fdbus_register_method): Cleanup memory of
error flag.
2009-07-08 Kenichi Handa <handa@m17n.org> 2009-07-08 Kenichi Handa <handa@m17n.org>
* fontset.c (fontset_find_font): Fix the logic of handling * fontset.c (fontset_find_font): Fix the logic of handling
......
...@@ -716,6 +716,9 @@ xd_initialize (bus) ...@@ -716,6 +716,9 @@ xd_initialize (bus)
if (connection == NULL) if (connection == NULL)
XD_SIGNAL2 (build_string ("No connection"), bus); XD_SIGNAL2 (build_string ("No connection"), bus);
/* Cleanup. */
dbus_error_free (&derror);
/* Return the result. */ /* Return the result. */
return connection; return connection;
} }
...@@ -935,6 +938,7 @@ usage: (dbus-call-method BUS SERVICE PATH INTERFACE METHOD &optional :timeout TI ...@@ -935,6 +938,7 @@ usage: (dbus-call-method BUS SERVICE PATH INTERFACE METHOD &optional :timeout TI
} }
/* Cleanup. */ /* Cleanup. */
dbus_error_free (&derror);
dbus_message_unref (dmessage); dbus_message_unref (dmessage);
dbus_message_unref (reply); dbus_message_unref (reply);
...@@ -1562,8 +1566,10 @@ xd_read_message (bus) ...@@ -1562,8 +1566,10 @@ xd_read_message (bus)
XD_DEBUG_MESSAGE ("Event stored: %s", XD_DEBUG_MESSAGE ("Event stored: %s",
SDATA (format2 ("%s", event.arg, Qnil))); SDATA (format2 ("%s", event.arg, Qnil)));
/* Cleanup. */
cleanup: cleanup:
dbus_message_unref (dmessage); dbus_message_unref (dmessage);
RETURN_UNGCPRO (Qnil); RETURN_UNGCPRO (Qnil);
} }
...@@ -1716,6 +1722,9 @@ usage: (dbus-register-signal BUS SERVICE PATH INTERFACE SIGNAL HANDLER &rest ARG ...@@ -1716,6 +1722,9 @@ usage: (dbus-register-signal BUS SERVICE PATH INTERFACE SIGNAL HANDLER &rest ARG
XD_ERROR (derror); XD_ERROR (derror);
} }
/* Cleanup. */
dbus_error_free (&derror);
XD_DEBUG_MESSAGE ("Matching rule \"%s\" created", rule); XD_DEBUG_MESSAGE ("Matching rule \"%s\" created", rule);
} }
...@@ -1784,6 +1793,9 @@ used for composing the returning D-Bus message. */) ...@@ -1784,6 +1793,9 @@ used for composing the returning D-Bus message. */)
if (NILP (Fmember (key1, value))) if (NILP (Fmember (key1, value)))
Fputhash (key, Fcons (key1, value), Vdbus_registered_functions_table); Fputhash (key, Fcons (key1, value), Vdbus_registered_functions_table);
/* Cleanup. */
dbus_error_free (&derror);
/* Return object. */ /* Return object. */
return list2 (key, list3 (service, path, handler)); return list2 (key, list3 (service, path, handler));
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment