[empathy: 78/148] Don't leak GErrors.
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: svn-commits-list gnome org
- Subject: [empathy: 78/148] Don't leak GErrors.
- Date: Mon, 1 Jun 2009 12:14:08 -0400 (EDT)
commit 83a1c8e38b10ca0a66adc4f19e78c69f3796c7e4
Author: Cosimo Cecchi <cosimo cecchi collabora co uk>
Date: Fri May 15 11:02:45 2009 +0200
Don't leak GErrors.
---
libempathy/empathy-ft-handler.c | 4 +++-
libempathy/empathy-tp-file.c | 1 +
2 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/libempathy/empathy-ft-handler.c b/libempathy/empathy-ft-handler.c
index 1f6fd86..453080d 100644
--- a/libempathy/empathy-ft-handler.c
+++ b/libempathy/empathy-ft-handler.c
@@ -663,7 +663,7 @@ hash_job_done (gpointer user_data)
"received %s, calculated %s", priv->content_hash,
g_checksum_get_string (hash_data->checksum));
- hash_data->error = g_error_new_literal (EMPATHY_FT_ERROR_QUARK,
+ error = g_error_new_literal (EMPATHY_FT_ERROR_QUARK,
EMPATHY_FT_ERROR_HASH_MISMATCH,
_("The hash of the received file and the sent one do not match"));
goto cleanup;
@@ -691,6 +691,7 @@ cleanup:
if (error != NULL)
{
emit_error_signal (handler, error);
+ g_clear_error (&error);
}
else
{
@@ -852,6 +853,7 @@ ft_handler_complete_request (EmpathyFTHandler *handler)
_("File transfer not supported by remote contact"));
emit_error_signal (handler, myerr);
+ g_clear_error (&myerr);
return;
}
diff --git a/libempathy/empathy-tp-file.c b/libempathy/empathy-tp-file.c
index a2a999b..1ca6858 100644
--- a/libempathy/empathy-tp-file.c
+++ b/libempathy/empathy-tp-file.c
@@ -375,6 +375,7 @@ tp_file_state_changed_cb (TpChannel *proxy,
{
error = error_from_state_change_reason (priv->state_change_reason);
ft_operation_close_with_error (EMPATHY_TP_FILE (weak_object), error);
+ g_clear_error (&error);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]