[telepathy-gabble/master] Don't leak content's name for GTalk contents

Will Thompson will.thompson at collabora.co.uk
Thu Jun 11 02:37:49 PDT 2009


g_object_get was putting a freshly-allocated string into 'name', which
(since it's a const gchar *) is never freed.
---
 src/jingle-session.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/jingle-session.c b/src/jingle-session.c
index f315546..371bc35 100644
--- a/src/jingle-session.c
+++ b/src/jingle-session.c
@@ -680,7 +680,7 @@ create_content (GabbleJingleSession *sess, GType content_type,
 
       /* gtalk streams don't have name, so use whatever Content came up with */
       if (name == NULL)
-          g_object_get (c, "name", &name, NULL);
+        name = gabble_jingle_content_get_name (c);
     }
 
   /* This will override existing content if it exists. */
-- 
1.5.6.5




More information about the telepathy-commits mailing list