[telepathy-mission-control/master] McdChannel: if changing error, don't leak the previous one

Simon McVittie simon.mcvittie at collabora.co.uk
Tue May 26 11:00:30 PDT 2009


---
 src/mcd-channel.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/mcd-channel.c b/src/mcd-channel.c
index c645006..819c9ee 100644
--- a/src/mcd-channel.c
+++ b/src/mcd-channel.c
@@ -1116,6 +1116,9 @@ mcd_channel_take_error (McdChannel *channel, GError *error)
 {
     g_return_if_fail (MCD_IS_CHANNEL (channel));
 
+    if (channel->priv->error != NULL)
+        g_error_free (channel->priv->error);
+
     channel->priv->error = error;
 
     if (error)
-- 
1.5.6.5




More information about the telepathy-commits mailing list