aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2014-03-26 23:48:03 +0800
committerMilan Crha <mcrha@redhat.com>2014-03-26 23:48:03 +0800
commit733462ca84044f3fe956b4578870ab7698242fd6 (patch)
tree2c9777fea09c0fc00177d230561584e27ac8a239
parenta2a29549268e8d75d0cc8c0f8de4d0542b1889b2 (diff)
downloadgsoc2013-evolution-733462ca84044f3fe956b4578870ab7698242fd6.tar
gsoc2013-evolution-733462ca84044f3fe956b4578870ab7698242fd6.tar.gz
gsoc2013-evolution-733462ca84044f3fe956b4578870ab7698242fd6.tar.bz2
gsoc2013-evolution-733462ca84044f3fe956b4578870ab7698242fd6.tar.lz
gsoc2013-evolution-733462ca84044f3fe956b4578870ab7698242fd6.tar.xz
gsoc2013-evolution-733462ca84044f3fe956b4578870ab7698242fd6.tar.zst
gsoc2013-evolution-733462ca84044f3fe956b4578870ab7698242fd6.zip
Fix two memory leaks
a) ETableColumnSpecification: the 'title' property is always overwritten during the spec file loading, thus no need to allocate it here b) the 'uids' are leaked on message move, because the GPtrArray is supposed to be always unreffed
-rw-r--r--e-util/e-table-column-specification.c2
-rw-r--r--mail/e-mail-reader.c8
2 files changed, 3 insertions, 7 deletions
diff --git a/e-util/e-table-column-specification.c b/e-util/e-table-column-specification.c
index befde720f4..da42a41b9f 100644
--- a/e-util/e-table-column-specification.c
+++ b/e-util/e-table-column-specification.c
@@ -72,7 +72,7 @@ e_table_column_specification_init (ETableColumnSpecification *specification)
{
specification->model_col = 0;
specification->compare_col = 0;
- specification->title = g_strdup ("");
+ specification->title = NULL;
specification->pixbuf = NULL;
specification->expansion = 0;
diff --git a/mail/e-mail-reader.c b/mail/e-mail-reader.c
index e1c477ed12..b7d380ac8d 100644
--- a/mail/e-mail-reader.c
+++ b/mail/e-mail-reader.c
@@ -868,20 +868,16 @@ action_mail_move_cb (GtkAction *action,
g_free (default_xfer_messages_uri);
default_xfer_messages_uri = g_strdup (uri);
- if (uri != NULL) {
+ if (uri != NULL)
mail_transfer_messages (
session, folder, uids,
TRUE, uri, 0, NULL, NULL);
- uids = NULL;
- }
exit:
- if (uids != NULL)
- g_ptr_array_unref (uids);
-
gtk_widget_destroy (dialog);
g_clear_object (&folder);
+ g_ptr_array_unref (uids);
}
static void