GDBusInterfaceVTable: clarify memory handling for the method() virtual function
[platform/upstream/glib.git] / gio / gdbusmethodinvocation.c
index bd40aaf..5bd850b 100644 (file)
@@ -13,9 +13,7 @@
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General
- * Public License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
  *
  * Author: David Zeuthen <davidz@redhat.com>
  */
@@ -274,9 +272,9 @@ g_dbus_method_invocation_get_connection (GDBusMethodInvocation *invocation)
  * descriptor passing, that cannot be properly expressed in the
  * #GVariant API.
  *
- * See <xref linkend="gdbus-server"/> and <xref
- * linkend="gdbus-unix-fd-client"/> for an example of how to use this
- * low-level API to send and receive UNIX file descriptors.
+ * See this [server][gdbus-server] and [client][gdbus-unix-fd-client]
+ * for an example of how to use this low-level API to send and receive
+ * UNIX file descriptors.
  *
  * Returns: (transfer none): #GDBusMessage. Do not free, it is owned by @invocation.
  *
@@ -444,6 +442,8 @@ g_dbus_method_invocation_return_value_internal (GDBusMethodInvocation *invocatio
               g_warning ("Value returned from property 'Get' call for '%s' should be '%s' but is '%s'",
                          invocation->property_info->name, invocation->property_info->signature,
                          g_variant_get_type_string (nested));
+              g_variant_unref (nested);
+              goto out;
             }
           g_variant_unref (nested);
         }
@@ -575,12 +575,11 @@ g_dbus_method_invocation_return_value_with_unix_fd_list (GDBusMethodInvocation *
  * will be returned on the wire. In a nutshell, if the given error is
  * registered using g_dbus_error_register_error() the name given
  * during registration is used. Otherwise, a name of the form
- * <literal>org.gtk.GDBus.UnmappedGError.Quark...</literal> is
- * used. This provides transparent mapping of #GError between
- * applications using GDBus.
+ * `org.gtk.GDBus.UnmappedGError.Quark...` is used. This provides
+ * transparent mapping of #GError between applications using GDBus.
  *
  * If you are writing an application intended to be portable,
- * <emphasis>always</emphasis> register errors with g_dbus_error_register_error()
+ * always register errors with g_dbus_error_register_error()
  * or use g_dbus_method_invocation_return_dbus_error().
  *
  * This method will free @invocation, you cannot use it afterwards.