GDBusProxy: report an error instead of leaking it

GDBusProxy sets an error on a GSimpleAsyncResult and then returns
without dispatching the result for completion (and leaks the result in
the process).  Fix that.

Also add a testcase.  Unfortunately, adding the testcase uncovered
bug #672248.  We can work around that by reordering the tests.

https://bugzilla.gnome.org/show_bug.cgi?id=672249
This commit is contained in:
Ryan Lortie
2012-03-16 13:15:46 -04:00
parent 190891042d
commit c3125ee36d
2 changed files with 45 additions and 1 deletions

View File

@@ -2727,6 +2727,8 @@ g_dbus_proxy_call_internal (GDBusProxy *proxy,
G_IO_ERROR,
G_IO_ERROR_FAILED,
_("Cannot invoke method; proxy is for a well-known name without an owner and proxy was constructed with the G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START flag"));
g_simple_async_result_complete_in_idle (simple);
g_object_unref (simple);
G_UNLOCK (properties_lock);
goto out;
}