Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
plug a memleak
[simgrid.git] / examples / s4u / io / s4u_io.cpp
index e9ebf57..d5c24cf 100644 (file)
@@ -66,6 +66,7 @@ public:
     // Test attaching some user data to the file
     file->setUserdata(xbt_strdup("777"));
     XBT_INFO("User data attached to the file: %s", (char*)file->userdata());
     // Test attaching some user data to the file
     file->setUserdata(xbt_strdup("777"));
     XBT_INFO("User data attached to the file: %s", (char*)file->userdata());
+    xbt_free(file->userdata());
 
     // Close the file
     delete file;
 
     // Close the file
     delete file;