[gnome-online-accounts] provider: Fix GoaProviderFactory leak
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-online-accounts] provider: Fix GoaProviderFactory leak
- Date: Tue, 27 Oct 2015 17:32:21 +0000 (UTC)
commit 2cc982bcdae36bd5604619740af5411899b987df
Author: Christophe Fergeau <cfergeau redhat com>
Date: Thu Jul 30 21:41:09 2015 +0200
provider: Fix GoaProviderFactory leak
This fixes:
==23326== 24 bytes in 1 blocks are definitely lost in loss record 5,177 of 18,672
==23326== at 0x4C28C50: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==23326== by 0x1445EFCC: g_malloc (gmem.c:94)
==23326== by 0x14477523: g_slice_alloc (gslice.c:1007)
==23326== by 0x14477563: g_slice_alloc0 (gslice.c:1032)
==23326== by 0x141E0A30: g_type_create_instance (gtype.c:1852)
==23326== by 0x141C7E85: g_object_new_internal (gobject.c:1779)
==23326== by 0x141C8394: g_object_newv (gobject.c:1926)
==23326== by 0x141C7A36: g_object_new (gobject.c:1619)
==23326== by 0x5BB0770: goa_provider_get_all (goaprovider.c:1219)
==23326== by 0x49BB34: add_account (cc-online-accounts-panel.c:779)
==23326== by 0x49BB78: on_toolbar_add_button_clicked (cc-online-accounts-panel.c:789)
==23326== by 0x141C29ED: g_cclosure_marshal_VOID__VOIDv (gmarshal.c:905)
==23326== by 0x141BFBE3: _g_closure_invoke_va (gclosure.c:864)
==23326== by 0x141DA3E7: g_signal_emit_valist (gsignal.c:3292)
==23326== by 0x141DB6CC: g_signal_emit_by_name (gsignal.c:3479)
==23326== by 0x126687D3: button_clicked (gtktoolbutton.c:944)
==23326== by 0x141C29ED: g_cclosure_marshal_VOID__VOIDv (gmarshal.c:905)
https://bugzilla.gnome.org/show_bug.cgi?id=756759
src/goabackend/goaprovider.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/goabackend/goaprovider.c b/src/goabackend/goaprovider.c
index 5c7d5a6..50f8b07 100644
--- a/src/goabackend/goaprovider.c
+++ b/src/goabackend/goaprovider.c
@@ -1193,8 +1193,11 @@ goa_provider_get_all (GAsyncReadyCallback callback,
for (l = extensions, i = 0; l != NULL; l = l->next, i++)
{
GIOExtension *extension = l->data;
- goa_provider_factory_get_providers (g_object_new (g_io_extension_get_type (extension), NULL),
- get_providers_cb, data);
+ GoaProviderFactory *factory;
+
+ factory = GOA_PROVIDER_FACTORY (g_object_new (g_io_extension_get_type (extension), NULL));
+ goa_provider_factory_get_providers (factory, get_providers_cb, data);
+ g_object_unref (factory);
data->pending_calls++;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]