}
if (result && !acyclic_graph_detail(result)) {
- XBT_ERROR("The DOT described in %s is not a DAG. It contains a cycle.", xbt_basename((char*)filename));
+ char* base = xbt_basename(filename);
+ XBT_ERROR("The DOT described in %s is not a DAG. It contains a cycle.", base);
+ free(base);
xbt_dynar_free(&result);
result = NULL;
}