Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Replace, when possible, calls to bprintf() by calls to xbt_strdup().
[simgrid.git] / src / xbt / graph.c
index b52ecaa..8fdec17 100644 (file)
@@ -159,7 +159,7 @@ void xbt_graph_free_graph(xbt_graph_t g,
   if (graph_free_function)
     (*graph_free_function) (g->data);
   free(g);
-
+  xbt_graph_parse_lex_destroy();
   return;
 }
 
@@ -626,7 +626,9 @@ xbt_graph_t xbt_graph_read(const char *filename,
   ETag_graphxml_edge_fun = __parse_edge;
 
   xbt_graph_parse_open(filename);
-  xbt_assert1((!(*xbt_graph_parse) ()), "Parse error in %s", filename);
+  int res;
+  res = (*xbt_graph_parse) ();
+  xbt_assert1(!res, "Parse error in %s", filename);
   xbt_graph_parse_close();
 
   graph = parsed_graph;