summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-03-18 14:31:03 +0100
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-03-18 14:31:03 +0100
commitaaf205a0470879631859db65c800c41cfea4c393 (patch)
tree23fb70d5b4f6a18f7645359e0a44315d58f3b787
parent8c8f99d52c9618dcbd87c97f9af2fc7c6c1db9ee (diff)
Fix feature leak if there is not service
-rw-r--r--src/private-tubes-factory.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/private-tubes-factory.c b/src/private-tubes-factory.c
index b524db12c..d38d3187b 100644
--- a/src/private-tubes-factory.c
+++ b/src/private-tubes-factory.c
@@ -888,11 +888,11 @@ gabble_private_tubes_factory_add_self_capability (
if (!tp_strdiff (channel_type, TP_IFACE_CHANNEL_TYPE_STREAM_TUBE))
{
- Feature *feat = g_new0 (Feature, 1);
gchar *service = g_strdup (tp_asv_get_string (cap,
TP_IFACE_CHANNEL_TYPE_STREAM_TUBE ".Service"));
if (service != NULL)
{
+ Feature *feat = g_new0 (Feature, 1);
feat->feature_type = FEATURE_OPTIONAL;
feat->ns = g_strdup_printf ("%s/stream#%s", NS_TUBES, service);
feat->caps = 0;
@@ -901,11 +901,11 @@ gabble_private_tubes_factory_add_self_capability (
}
else if (!tp_strdiff (channel_type, TP_IFACE_CHANNEL_TYPE_DBUS_TUBE))
{
- Feature *feat = g_new0 (Feature, 1);
gchar *service = g_strdup (tp_asv_get_string (cap,
TP_IFACE_CHANNEL_TYPE_DBUS_TUBE ".ServiceName"));
if (service != NULL)
{
+ Feature *feat = g_new0 (Feature, 1);
feat->feature_type = FEATURE_OPTIONAL;
feat->ns = g_strdup_printf ("%s/dbus#%s", NS_TUBES, service);
feat->caps = 0;