summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2010-09-21 15:18:28 +0100
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2010-09-22 18:08:43 +0100
commitee911fc4930c0466d4d8d75c83b179715a2c3ce5 (patch)
treedac8619e7b86ab4a4544632da3e0dc3a821a383b
parentf4bf48bd8f6ccbe4a0bbbdd09d3849df69cd5336 (diff)
downloadtelepathy-gabble-ee911fc4930c0466d4d8d75c83b179715a2c3ce5.tar.gz
gabble_call_stream_get_property: don't leak LOCAL_CANDIDATES
Also, omit a redundant deep-copy. Previously, the array was deep-copied and then unref'd. The copy and its contents would be freed by the GValue, but the contents of the original array were leaked. Now, we hand over the array to the GValue and everything is freed.
-rw-r--r--src/call-stream.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/call-stream.c b/src/call-stream.c
index 07ba820c3..7d7d1b2b8 100644
--- a/src/call-stream.c
+++ b/src/call-stream.c
@@ -139,8 +139,7 @@ gabble_call_stream_get_property (GObject *object,
gabble_jingle_content_get_local_candidates (priv->content);
arr = gabble_call_candidates_to_array (candidates);
- g_value_set_boxed (value, arr);
- g_ptr_array_unref (arr);
+ g_value_take_boxed (value, arr);
break;
}