aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2008-03-11 20:23:10 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2008-03-11 20:23:10 +0800
commiteeae2f62192b97d5509ae16ae6cabbe29ef5c455 (patch)
tree0ab3ce6d4ba9c61059cf5eaa6b206e2467152ebd
parent16d5526f7a400eae93a1a7858ec73b2d99fadd48 (diff)
downloadgsoc2013-empathy-eeae2f62192b97d5509ae16ae6cabbe29ef5c455.tar
gsoc2013-empathy-eeae2f62192b97d5509ae16ae6cabbe29ef5c455.tar.gz
gsoc2013-empathy-eeae2f62192b97d5509ae16ae6cabbe29ef5c455.tar.bz2
gsoc2013-empathy-eeae2f62192b97d5509ae16ae6cabbe29ef5c455.tar.lz
gsoc2013-empathy-eeae2f62192b97d5509ae16ae6cabbe29ef5c455.tar.xz
gsoc2013-empathy-eeae2f62192b97d5509ae16ae6cabbe29ef5c455.tar.zst
gsoc2013-empathy-eeae2f62192b97d5509ae16ae6cabbe29ef5c455.zip
Check if property is writable before setting it. Fix leaks
svn path=/trunk/; revision=774
-rw-r--r--libempathy/empathy-tp-chat.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libempathy/empathy-tp-chat.c b/libempathy/empathy-tp-chat.c
index 7ae3168c1..dc90f28e2 100644
--- a/libempathy/empathy-tp-chat.c
+++ b/libempathy/empathy-tp-chat.c
@@ -512,6 +512,10 @@ empathy_tp_chat_set_property (EmpathyTpChat *chat,
GValue id = {0, };
GValue dest_value = {0, };
+ if (!(property->flags & TP_PROPERTY_FLAG_WRITE)) {
+ break;
+ }
+
g_value_init (&id, G_TYPE_UINT);
g_value_init (&dest_value, G_TYPE_VALUE);
g_value_set_uint (&id, property->id);
@@ -532,6 +536,9 @@ empathy_tp_chat_set_property (EmpathyTpChat *chat,
"Seting property", NULL,
G_OBJECT (chat));
+ g_ptr_array_free (properties, TRUE);
+ g_value_array_free (prop);
+
break;
}
}