| Summary: | TpBaseConnectionManager leaks legacy protocol objects | ||
|---|---|---|---|
| Product: | Telepathy | Reporter: | Olli Salli <ollisal> |
| Component: | tp-glib | Assignee: | Simon McVittie <smcv> |
| Status: | RESOLVED FIXED | QA Contact: | Telepathy bugs list <telepathy-bugs> |
| Severity: | trivial | ||
| Priority: | medium | Keywords: | patch |
| Version: | 0.12 | ||
| Hardware: | Other | ||
| OS: | All | ||
| URL: | http://git.collabora.co.uk/?p=user/smcv/telepathy-glib-smcv.git;a=shortlog;h=refs/heads/012-leaked-protocol | ||
| Whiteboard: | review+ | ||
| i915 platform: | i915 features: | ||
Also affects the 0.12 stable branch. Not problematic in practice, since in a real CM, the TpBaseConnectionManager subclass is constructed during initialization and not released until the process exits. This seems to work. wowzer Fixed in git for 0.12.6 and 0.13.9. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.
tp_base_connection_manager_register does: if (cls->protocol_params != NULL) { for (i = 0; cls->protocol_params[i].name != NULL; i++) { tp_base_connection_manager_add_protocol (self, _tp_legacy_protocol_new (self, cls->protocol_params + i)); } } and add_protocol does: g_hash_table_insert (self->priv->protocols, g_strdup (tp_base_protocol_get_name (protocol)), g_object_ref (protocol)); and obviously, there is just one unref in total, from the value destructor specified when creating the protocols hash table. I guess the protocol object can't be made GInitiallyUnowned; just unref the protocol manually using a temp var in register()?