]> git.0d.be Git - empathy.git/commitdiff
main_window_flash_foreach: fix FolksIndividual leak
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Tue, 7 Jun 2011 13:13:54 +0000 (15:13 +0200)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Tue, 7 Jun 2011 13:18:36 +0000 (15:18 +0200)
src/empathy-main-window.c

index a120d5891a21ac68e7a34fa4330e6642fc53297f..9cc65ba61ad3a9887f1b4e93b34b2f6a8d04715a 100644 (file)
@@ -211,10 +211,8 @@ main_window_flash_foreach (GtkTreeModel *model,
                return FALSE;
 
        contact = empathy_contact_dup_from_folks_individual (individual);
-       if (contact != data->event->contact) {
-               tp_clear_object (&contact);
-               return FALSE;
-       }
+       if (contact != data->event->contact)
+               goto out;
 
        if (data->on) {
                icon_name = data->event->icon_name;
@@ -243,6 +241,7 @@ main_window_flash_foreach (GtkTreeModel *model,
                gtk_tree_path_free (parent_path);
        }
 
+out:
        g_object_unref (individual);
        tp_clear_object (&contact);
        tp_clear_object (&pixbuf);