[Telepathy-commits] [telepathy-salut/master] Duplicate the filename from the stanza and free it on finalize.

Jonny Lamb jonny.lamb at collabora.co.uk
Fri Nov 21 03:46:24 PST 2008


Signed-off-by: Jonny Lamb <jonny.lamb at collabora.co.uk>
---
 src/salut-file-channel.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/salut-file-channel.c b/src/salut-file-channel.c
index 51da3b6..1f05f01 100644
--- a/src/salut-file-channel.c
+++ b/src/salut-file-channel.c
@@ -648,6 +648,7 @@ salut_file_channel_finalize (GObject *object)
 
   /* free any data held directly by the object here */
   g_free (self->priv->object_path);
+  g_free (self->priv->filename);
 
   G_OBJECT_CLASS (salut_file_channel_parent_class)->finalize (object);
 }
@@ -846,7 +847,7 @@ salut_file_channel_received_file_offer (SalutFileChannel *self,
 
   self->priv->ft = ft;
 
-  self->priv->filename = ft->filename;
+  self->priv->filename = g_strdup (ft->filename);
   self->priv->size = ft->size;
 }
 
-- 
1.5.6.5




More information about the Telepathy-commits mailing list