{
if ((tmp - tmp_facilities - 1) > 0)
{
- g_log_facilities_no_match[num_no_match] = strndup(tmp_facilities + 1, tmp - tmp_facilities - 1);
+ g_log_facilities_no_match[num_no_match] = g_strndup(tmp_facilities + 1, tmp - tmp_facilities - 1);
++num_no_match;
}
}
else
{
- g_log_facilities_match[num_match] = strndup(tmp_facilities, tmp - tmp_facilities);
+ g_log_facilities_match[num_match] = g_strndup(tmp_facilities, tmp - tmp_facilities);
++num_match;
}
}
{
if ((strlen(tmp_facilities) - 1) > 0)
{
- g_log_facilities_no_match[num_no_match] = strdup(tmp_facilities + 1);
+ g_log_facilities_no_match[num_no_match] = g_strdup(tmp_facilities + 1);
++num_no_match;
}
}
else
{
- g_log_facilities_match[num_match] = strdup(tmp_facilities);
+ g_log_facilities_match[num_match] = g_strdup(tmp_facilities);
++num_match;
}
}
{
for (i = 0; g_log_facilities_no_match[i]; ++i)
{
- free(g_log_facilities_no_match[i]);
+ g_free(g_log_facilities_no_match[i]);
g_log_facilities_no_match[i] = NULL;
}
g_free(g_log_facilities_no_match);
{
for (i = 0; g_log_facilities_match[i]; ++i)
{
- free(g_log_facilities_match[i]);
+ g_free(g_log_facilities_match[i]);
g_log_facilities_match[i] = NULL;
}
g_free(g_log_facilities_match);