Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
plug a bunch of memleaks
[simgrid.git] / src / surf / xml / surfxml_parseplatf.cpp
index 9527602..14ebf6d 100644 (file)
@@ -147,9 +147,10 @@ void parse_platform_file(const char *file)
 
     /* Run the script */
     if (lua_pcall(L, 0, 0, 0)) {
-        XBT_ERROR("FATAL ERROR:\n  %s: %s\n\n", "Lua call failed. Errormessage:", lua_tostring(L, -1));
-        xbt_die("Lua call failed. See Log");
+      XBT_ERROR("FATAL ERROR:\n  %s: %s\n\n", "Lua call failed. Error message:", lua_tostring(L, -1));
+      xbt_die("Lua call failed. See Log");
     }
+    lua_close(L);
   }
   else
 #endif