]> git.0d.be Git - empathy.git/blobdiff - libempathy-gtk/empathy-individual-store.c
Merge branch 'sasl'
[empathy.git] / libempathy-gtk / empathy-individual-store.c
index dbea416a773c9e588668e170143d882b8c7c60ae..4b07131a60ac1691ce63cf3398ab01e08b306a7b 100644 (file)
@@ -361,6 +361,13 @@ individual_store_find_contact (EmpathyIndividualStore *self,
   return l;
 }
 
+static void
+free_iters (GList *iters)
+{
+  g_list_foreach (iters, (GFunc) gtk_tree_iter_free, NULL);
+  g_list_free (iters);
+}
+
 static void
 individual_store_remove_individual (EmpathyIndividualStore *self,
     FolksIndividual *individual)
@@ -397,8 +404,7 @@ individual_store_remove_individual (EmpathyIndividualStore *self,
         }
     }
 
-  g_list_foreach (iters, (GFunc) gtk_tree_iter_free, NULL);
-  g_list_free (iters);
+  free_iters (iters);
 }
 
 static void
@@ -520,9 +526,7 @@ individual_store_contact_set_active (EmpathyIndividualStore *self,
         }
     }
 
-  g_list_foreach (iters, (GFunc) gtk_tree_iter_free, NULL);
-  g_list_free (iters);
-
+  free_iters (iters);
 }
 
 static void individual_store_contact_active_free (ShowActiveData *data);
@@ -647,6 +651,8 @@ individual_avatar_pixbuf_received_cb (FolksIndividual *individual,
               EMPATHY_INDIVIDUAL_STORE_COL_PIXBUF_AVATAR, pixbuf,
               -1);
         }
+
+      free_iters (iters);
     }
 
   /* Free things */
@@ -660,6 +666,7 @@ individual_avatar_pixbuf_received_cb (FolksIndividual *individual,
           data->cancellable);
     }
 
+  tp_clear_object (&pixbuf);
   g_object_unref (data->cancellable);
   g_slice_free (LoadAvatarData, data);
 }
@@ -821,8 +828,7 @@ individual_store_contact_update (EmpathyIndividualStore *self,
    * timeout removes the user from the contact list, really we
    * should remove the first timeout.
    */
-  g_list_foreach (iters, (GFunc) gtk_tree_iter_free, NULL);
-  g_list_free (iters);
+  free_iters (iters);
 }
 
 static void