if (NULL != data) {
if (NULL != data->engine_uuid) {
- free(data->engine_uuid);
+ g_free(data->engine_uuid);
data->engine_uuid = NULL;
}
if (NULL != data->engine_name) {
- free(data->engine_name);
+ g_free(data->engine_name);
data->engine_name = NULL;
}
if (NULL != data->engine_path) {
- free(data->engine_path);
+ g_free(data->engine_path);
data->engine_path = NULL;
}
} else {
if (NULL != g_dynamic_engine.engine_uuid) {
/* set data from g_engine_list */
- if (g_dynamic_engine.engine_uuid != NULL) free(g_dynamic_engine.engine_uuid);
- if (g_dynamic_engine.engine_name != NULL) free(g_dynamic_engine.engine_name);
- if (g_dynamic_engine.engine_path != NULL) free(g_dynamic_engine.engine_path);
+ if (g_dynamic_engine.engine_uuid != NULL) g_free(g_dynamic_engine.engine_uuid);
+ if (g_dynamic_engine.engine_name != NULL) g_free(g_dynamic_engine.engine_name);
+ if (g_dynamic_engine.engine_path != NULL) g_free(g_dynamic_engine.engine_path);
}
g_dynamic_engine.engine_uuid = g_strdup(dynamic_engine->engine_uuid);
data = iter->data;
if (NULL != data) {
- if (NULL != data->engine_uuid) free(data->engine_uuid);
- if (NULL != data->engine_path) free(data->engine_path);
- if (NULL != data->engine_name) free(data->engine_name);
+ if (NULL != data->engine_uuid) g_free(data->engine_uuid);
+ if (NULL != data->engine_path) g_free(data->engine_path);
+ if (NULL != data->engine_name) g_free(data->engine_name);
+
+ data->engine_uuid = NULL;
+ data->engine_path = NULL;
+ data->engine_name = NULL;
free(data);
}