blob: 4480d1ba447407767ff2f377d46682bc04baf9d5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
// SPDX-License-Identifier: GPL-3.0-or-later
#include "exporting_engine.h"
/**
* Clean the instance config.
*
* @param config an instance config structure.
*/
static void clean_instance_config(struct instance_config *config)
{
if(!config)
return;
freez((void *)config->type_name);
freez((void *)config->name);
freez((void *)config->destination);
simple_pattern_free(config->charts_pattern);
simple_pattern_free(config->hosts_pattern);
}
/**
* Clean the allocated variables
*
* @param instance an instance data structure.
*/
void clean_instance(struct instance *instance)
{
clean_instance_config(&instance->config);
buffer_free(instance->labels);
uv_cond_destroy(&instance->cond_var);
// uv_mutex_destroy(&instance->mutex);
}
|