~3v1n0/bamf/desktopless-webapps-fix

« back to all changes in this revision

Viewing changes to tests/bamfdaemon/test-view.c

  • Committer: Tarmac
  • Author(s): Charles Kerr
  • Date: 2012-02-25 00:25:23 UTC
  • mfrom: (446.1.1 bamf)
  • Revision ID: tarmac-20120225002523-5q1vm085i3xxqohr
. Fixes: https://bugs.launchpad.net/bugs/937402. Approved by Marco Trevisan (Treviño).

Show diffs side-by-side

added added

removed removed

Lines of Context:
147
147
static void
148
148
test_path_collision (void)
149
149
{
150
 
  BamfView *view;
151
 
  GList *views, *l;
152
150
  int i, j;
153
151
  
154
152
  for (i = 0; i < 20; i++)
155
153
    {
 
154
      GList *views = NULL;
 
155
 
156
156
      for (j = 0; j < 2000; j++)
157
157
        {
158
 
          view = g_object_new (BAMF_TYPE_VIEW, NULL);
 
158
          BamfView * view = g_object_new (BAMF_TYPE_VIEW, NULL);
159
159
          g_assert (BAMF_IS_VIEW (view));
160
160
 
161
161
          views = g_list_prepend (views, view);
163
163
          bamf_view_export_on_bus (view, gdbus_connection);
164
164
        }
165
165
 
166
 
      for (l = views; l; l = l->next)
167
 
        {
168
 
          g_object_unref (l->data);
169
 
        }
170
 
 
171
 
      g_list_free (views);
172
 
      views = NULL;
 
166
      g_list_free_full (views, g_object_unref);
173
167
    }
174
168
}
175
169