diff options
| author | Michael Albinus | 2009-07-08 12:59:47 +0000 |
|---|---|---|
| committer | Michael Albinus | 2009-07-08 12:59:47 +0000 |
| commit | c1d5ce9488bba9b3bc2b1dffe5e3615a409c4854 (patch) | |
| tree | 22bb498dbedac9110e6e0d3b450db9729637c0c5 /src/dbusbind.c | |
| parent | 93c3eb7c61e2992e80ff14bd98fb68e4e66dca41 (diff) | |
| download | emacs-c1d5ce9488bba9b3bc2b1dffe5e3615a409c4854.tar.gz emacs-c1d5ce9488bba9b3bc2b1dffe5e3615a409c4854.zip | |
* dbusbind.c (xd_initialize, Fdbus_call_method, xd_read_message)
(Fdbus_register_signal, Fdbus_register_method): Cleanup memory of
error flag.
Diffstat (limited to 'src/dbusbind.c')
| -rw-r--r-- | src/dbusbind.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/dbusbind.c b/src/dbusbind.c index 670ef6b1afe..8100c754399 100644 --- a/src/dbusbind.c +++ b/src/dbusbind.c | |||
| @@ -716,6 +716,9 @@ xd_initialize (bus) | |||
| 716 | if (connection == NULL) | 716 | if (connection == NULL) |
| 717 | XD_SIGNAL2 (build_string ("No connection"), bus); | 717 | XD_SIGNAL2 (build_string ("No connection"), bus); |
| 718 | 718 | ||
| 719 | /* Cleanup. */ | ||
| 720 | dbus_error_free (&derror); | ||
| 721 | |||
| 719 | /* Return the result. */ | 722 | /* Return the result. */ |
| 720 | return connection; | 723 | return connection; |
| 721 | } | 724 | } |
| @@ -935,6 +938,7 @@ usage: (dbus-call-method BUS SERVICE PATH INTERFACE METHOD &optional :timeout TI | |||
| 935 | } | 938 | } |
| 936 | 939 | ||
| 937 | /* Cleanup. */ | 940 | /* Cleanup. */ |
| 941 | dbus_error_free (&derror); | ||
| 938 | dbus_message_unref (dmessage); | 942 | dbus_message_unref (dmessage); |
| 939 | dbus_message_unref (reply); | 943 | dbus_message_unref (reply); |
| 940 | 944 | ||
| @@ -1562,8 +1566,10 @@ xd_read_message (bus) | |||
| 1562 | XD_DEBUG_MESSAGE ("Event stored: %s", | 1566 | XD_DEBUG_MESSAGE ("Event stored: %s", |
| 1563 | SDATA (format2 ("%s", event.arg, Qnil))); | 1567 | SDATA (format2 ("%s", event.arg, Qnil))); |
| 1564 | 1568 | ||
| 1569 | /* Cleanup. */ | ||
| 1565 | cleanup: | 1570 | cleanup: |
| 1566 | dbus_message_unref (dmessage); | 1571 | dbus_message_unref (dmessage); |
| 1572 | |||
| 1567 | RETURN_UNGCPRO (Qnil); | 1573 | RETURN_UNGCPRO (Qnil); |
| 1568 | } | 1574 | } |
| 1569 | 1575 | ||
| @@ -1716,6 +1722,9 @@ usage: (dbus-register-signal BUS SERVICE PATH INTERFACE SIGNAL HANDLER &rest ARG | |||
| 1716 | XD_ERROR (derror); | 1722 | XD_ERROR (derror); |
| 1717 | } | 1723 | } |
| 1718 | 1724 | ||
| 1725 | /* Cleanup. */ | ||
| 1726 | dbus_error_free (&derror); | ||
| 1727 | |||
| 1719 | XD_DEBUG_MESSAGE ("Matching rule \"%s\" created", rule); | 1728 | XD_DEBUG_MESSAGE ("Matching rule \"%s\" created", rule); |
| 1720 | } | 1729 | } |
| 1721 | 1730 | ||
| @@ -1784,6 +1793,9 @@ used for composing the returning D-Bus message. */) | |||
| 1784 | if (NILP (Fmember (key1, value))) | 1793 | if (NILP (Fmember (key1, value))) |
| 1785 | Fputhash (key, Fcons (key1, value), Vdbus_registered_functions_table); | 1794 | Fputhash (key, Fcons (key1, value), Vdbus_registered_functions_table); |
| 1786 | 1795 | ||
| 1796 | /* Cleanup. */ | ||
| 1797 | dbus_error_free (&derror); | ||
| 1798 | |||
| 1787 | /* Return object. */ | 1799 | /* Return object. */ |
| 1788 | return list2 (key, list3 (service, path, handler)); | 1800 | return list2 (key, list3 (service, path, handler)); |
| 1789 | } | 1801 | } |