  
    priv->ids = g_hash_table_new_full (g_str_hash, g_str_equal,
                                       g_free, NULL);
-@@ -282,9 +281,9 @@
+@@ -276,15 +275,20 @@
+   G_OBJECT_CLASS (e_data_book_view_parent_class)->dispose (object);
+ }
+ 
++static void reset_array (GPtrArray *array);
++
+ static void
+ e_data_book_view_finalize (GObject *object)
+ {
    EDataBookView *book_view = E_DATA_BOOK_VIEW (object);
    EDataBookViewPrivate *priv = book_view->priv;
  
 -  g_strfreev ((char**)g_array_free (priv->adds, FALSE));
 -  g_strfreev ((char**)g_array_free (priv->changes, FALSE));
 -  g_strfreev ((char**)g_array_free (priv->removes, FALSE));
-+  g_strfreev ((char**) g_ptr_array_free (priv->adds, FALSE));
-+  g_strfreev ((char**) g_ptr_array_free (priv->changes, FALSE));
-+  g_strfreev ((char**) g_ptr_array_free (priv->removes, FALSE));
++  reset_array (priv->adds);
++  reset_array (priv->changes);
++  reset_array (priv->removes);
++  g_ptr_array_free (priv->adds, FALSE);
++  g_ptr_array_free (priv->changes, FALSE);
++  g_ptr_array_free (priv->removes, FALSE);
  
    g_free (priv->card_query);
  
-@@ -454,6 +453,17 @@
+@@ -454,6 +458,17 @@
  }
  
  static void

     else
       /* else nothing; we're removing a card that wasn't there */
       g_free (vcard);
@@ -626,7 +643,7 @@
     g_hash_table_lookup (priv->ids, id) != NULL;
 
   if (currently_in_view)

     /* else nothing; we're removing a card that wasn't there */
   }
 
@@ -595,12 +617,12 @@
 
   if (want_in_view) {
     if (currently_in_view)
