There is no need to alloc/free that string.
} dfsm_queued_message_t;
struct dfsm {
- char *log_domain;
+ const char *log_domain;
cpg_callbacks_t *cpg_callbacks;
dfsm_callbacks_t *dfsm_callbacks;
cpg_handle_t cpg_handle;
if (!(dfsm->msg_queue = g_sequence_new(NULL)))
goto err;
- dfsm->log_domain = g_strdup(log_domain);
+ dfsm->log_domain = log_domain;
dfsm->data = data;
dfsm->mode = DFSM_MODE_START;
dfsm->protocol_version = protocol_version;
if (dfsm->members)
g_hash_table_destroy(dfsm->members);
- if (dfsm->log_domain)
- g_free(dfsm->log_domain);
-
g_free(dfsm);
}