Bug 76119

Summary: lots of avatar-related g_file_get_path() results are leaked
Product: Telepathy Reporter: Simon McVittie <smcv>
Component: tp-glibAssignee: Telepathy bugs list <telepathy-bugs>
Status: RESOLVED FIXED QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Simon McVittie 2014-03-13 13:53:18 UTC
g_file_get_path() returns (transfer full), but its usage in telepathy-glib avatar handling fairly consistently assumes it returns (transfer none), resulting in leaks.

My commit 362dc49 from Bug #76000 fixes a couple of leaks, but I noticed they aren't the only ones.
Comment 1 Simon McVittie 2014-03-13 14:30:23 UTC
> @@ -2797,19 +2797,21 @@ mime_file_written (GObject *source_object,
> + path = g_file_get_path (file);
> @@ -2828,8 +2830,7 @@ mime_file_written (GObject *source_object,
> - self->priv->identifier,
> - g_file_get_path (avatar_data->file));
> + self->priv->identifier, path);

Wrong path: avatar_data->file is not the same as avatar_data->mime_file.

Everything else looks fine.
Comment 2 Guillaume Desmottes 2014-03-13 14:48:50 UTC
Fixed for 0.22.2, 0.23.3 and 0.99.8.

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.