void oval_affected_free(struct oval_affected *affected)
{
	__attribute__nonnull__(affected);

	oval_collection_free_items(affected->platforms, (oscap_destruct_func) & oscap_free);
	affected->platforms = NULL;
	oval_collection_free_items(affected->products, (oscap_destruct_func) & oscap_free);
	affected->products = NULL;
	oscap_free(affected);
}
Exemple #2
0
void oval_definition_model_free(struct oval_definition_model *model)
{
	__attribute__nonnull__(model);

	oval_string_map_free(model->definition_map, (oscap_destruct_func) oval_definition_free);
	oval_string_map_free(model->object_map, (oscap_destruct_func) oval_object_free);
	oval_string_map_free(model->state_map, (oscap_destruct_func) oval_state_free);
	oval_string_map_free(model->test_map, (oscap_destruct_func) oval_test_free);
	oval_string_map_free(model->variable_map, (oscap_destruct_func) oval_variable_free);
	if (model->vardef_map != NULL)
		oval_string_map_free(model->vardef_map, (oscap_destruct_func) oval_string_map_free0);
	if (model->bound_variable_models)
		oval_collection_free_items(model->bound_variable_models,
					   (oscap_destruct_func) oval_variable_model_free);

        if (model->schema != NULL)
            oscap_free(model->schema);

	model->definition_map = NULL;
	model->object_map = NULL;
	model->state_map = NULL;
	model->test_map = NULL;
	model->variable_map = NULL;
        model->schema = NULL;

	oval_generator_free(model->generator);

	oscap_free(model);
}
Exemple #3
0
void oval_result_test_free(struct oval_result_test *test)
{
	__attribute__nonnull__(test);

	oval_collection_free_items(test->messages, (oscap_destruct_func) oval_message_free);
	oval_collection_free_items(test->items, (oscap_destruct_func) oval_result_item_free);
	oval_collection_free_items(test->bindings, (oscap_destruct_func) oval_variable_binding_free);

	test->system = NULL;
	test->test = NULL;
	test->messages = NULL;
	test->result = OVAL_RESULT_NOT_EVALUATED;
	test->items = NULL;
	test->bindings = NULL;
	test->instance = 1;
	oscap_free(test);
}
void oval_state_content_free(struct oval_state_content *content)
{
	__attribute__nonnull__(content);

	if (content->entity)
		oval_entity_free(content->entity);
	if (content->record_fields)
		oval_collection_free_items(content->record_fields, (oscap_destruct_func) oval_record_field_free);
	oscap_free(content);
}
void oval_result_definition_free(struct oval_result_definition *definition)
{
	__attribute__nonnull__(definition);

	if (definition->criteria)
		oval_result_criteria_node_free(definition->criteria);
	oval_collection_free_items(definition->messages, (oscap_destruct_func) oval_message_free);

	definition->system = NULL;
	definition->criteria = NULL;
	definition->definition = NULL;
	definition->messages = NULL;
	definition->result = OVAL_RESULT_NOT_EVALUATED;
	definition->instance = 1;
	oscap_free(definition);
}
Exemple #6
0
void oval_sysent_free(struct oval_sysent *sysent)
{
	if (sysent == NULL)
		return;

	if (sysent->name != NULL)
		oscap_free(sysent->name);
	if (sysent->value != NULL)
		oscap_free(sysent->value);
	if (sysent->record_fields)
		oval_collection_free_items(sysent->record_fields, (oscap_destruct_func) oval_record_field_free);

	sysent->name = NULL;
	sysent->value = NULL;

	oscap_free(sysent);
}
Exemple #7
0
void oval_test_free(struct oval_test *test)
{
	__attribute__nonnull__(test);

	if (test->comment != NULL)
		oscap_free(test->comment);
	if (test->id != NULL)
		oscap_free(test->id);
	oval_collection_free_items(test->notes, &oscap_free);
	oval_collection_free(test->states);

	test->comment = NULL;
	test->id = NULL;
	test->notes = NULL;
	test->object = NULL;
	test->states = NULL;

	oscap_free(test);
}
void oval_collection_free(struct oval_collection *collection)
{
	oval_collection_free_items(collection, NULL);
}