<commit_before>/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */

#include <stdlib.h>
#include <libecal/e-cal.h>
#include <libecal/e-cal-time-util.h>
#include <libical/ical.h>

#include "ecal-test-utils.h"

gint
main (gint argc, gchar **argv)
{
	ECal *cal;
	char *uri = NULL;
        GList *users = NULL;
        icaltimezone *utc;
        time_t start = time (NULL), end;
	GList *free_busy;

	g_type_init ();

	cal = ecal_test_utils_cal_new_temp (&uri, E_CAL_SOURCE_TYPE_EVENT);
	ecal_test_utils_cal_open (cal, FALSE);

        utc = icaltimezone_get_utc_timezone ();
        start = time_from_isodate ("20040212T000000Z");
        end = time_add_day_with_zone (start, 2, utc);
	/* XXX: create dummy list, which the file backend will ignore */
	users = g_list_prepend (users, NULL);

	free_busy = ecal_test_utils_cal_get_free_busy (cal, users, start, end);

	ecal_test_utils_cal_remove (cal);

	g_list_foreach (free_busy, (GFunc) icalcomponent_free, NULL);
	g_list_free (free_busy);

	return 0;
}<commit_msg>Use the proper freeing function for the members of the list returned by e_cal_get_free_busy().<commit_after>/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */

#include <stdlib.h>
#include <libecal/e-cal.h>
#include <libecal/e-cal-time-util.h>
#include <libical/ical.h>

#include "ecal-test-utils.h"

gint
main (gint argc, gchar **argv)
{
	ECal *cal;
	char *uri = NULL;
        GList *users = NULL;
        icaltimezone *utc;
        time_t start = time (NULL), end;
	GList *free_busy;

	g_type_init ();

	cal = ecal_test_utils_cal_new_temp (&uri, E_CAL_SOURCE_TYPE_EVENT);
	ecal_test_utils_cal_open (cal, FALSE);

        utc = icaltimezone_get_utc_timezone ();
        start = time_from_isodate ("20040212T000000Z");
        end = time_add_day_with_zone (start, 2, utc);
	/* XXX: create dummy list, which the file backend will ignore */
	users = g_list_prepend (users, NULL);

	free_busy = ecal_test_utils_cal_get_free_busy (cal, users, start, end);

	ecal_test_utils_cal_remove (cal);

	g_list_foreach (free_busy, (GFunc) g_object_unref, NULL);
	g_list_free (free_busy);

	return 0;
}
{'fraction_non_alphanumeric': 0.13088029809035864, 'fraction_numerical': 0.016767582673497903, 'mean_word_length': 4.030444964871195, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7311300', 'n_tokens_mistral': 892, 'n_tokens_neox': 836, 'n_words': 195}