[telepathy-glib/master] tp_proxy_subclass_add_error_mapping: annotate an intentional one-per-process allocation per error enum
Simon McVittie
simon.mcvittie at collabora.co.uk
Thu Dec 3 11:06:56 PST 2009
---
telepathy-glib/proxy.c | 3 +++
tools/telepathy-glib.supp | 8 ++++++++
2 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/telepathy-glib/proxy.c b/telepathy-glib/proxy.c
index b7c299b..61dd202 100644
--- a/telepathy-glib/proxy.c
+++ b/telepathy-glib/proxy.c
@@ -950,6 +950,9 @@ tp_proxy_subclass_add_error_mapping (GType proxy_subclass,
new_link = g_slice_new0 (TpProxyErrorMappingLink);
new_link->prefix = static_prefix;
new_link->domain = domain;
+ /* We never unref the enum type - intentional one-per-process leak.
+ * See "tp_proxy_subclass_add_error_mapping refs the enum" in our valgrind
+ * suppressions file */
new_link->code_enum_class = g_type_class_ref (code_enum_type);
new_link->next = old_link; /* may be NULL */
g_type_set_qdata (proxy_subclass, q, new_link);
diff --git a/tools/telepathy-glib.supp b/tools/telepathy-glib.supp
index eafb982..2b3d4e8 100644
--- a/tools/telepathy-glib.supp
+++ b/tools/telepathy-glib.supp
@@ -157,6 +157,14 @@
fun:tp_dbus_daemon_constructor
}
+{
+ tp_proxy_subclass_add_error_mapping refs the enum
+ Memcheck:Leak
+ ...
+ fun:g_type_class_ref
+ fun:tp_proxy_subclass_add_error_mapping
+}
+
# ============================= unclassified ==========================
{
--
1.5.6.5
More information about the telepathy-commits
mailing list