Bug 76119 - lots of avatar-related g_file_get_path() results are leaked
Summary: lots of avatar-related g_file_get_path() results are leaked
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: tp-glib (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-13 13:53 UTC by Simon McVittie
Modified: 2014-03-13 14:48 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

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.