]> git.0d.be Git - empathy.git/commitdiff
Don't leak GErrors.
authorCosimo Cecchi <cosimo.cecchi@collabora.co.uk>
Fri, 15 May 2009 09:02:45 +0000 (11:02 +0200)
committerCosimo Cecchi <cosimoc@gnome.org>
Mon, 1 Jun 2009 15:49:57 +0000 (17:49 +0200)
libempathy/empathy-ft-handler.c
libempathy/empathy-tp-file.c

index 1f6fd86d2b6936ad58321c7782a8156f0777dd42..453080df539e46d3c9fa3b77371a5bbb73e21de5 100644 (file)
@@ -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;
     }
index a2a999b81f9bbd05d79c2fbee0c400a95950048e..1ca6858efda54aac978b108f3ca67c65c725e01d 100644 (file)
@@ -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);
     }
 }