Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
plug a memleak
authorMartin Quinson <martin.quinson@loria.fr>
Sun, 14 Aug 2016 20:45:31 +0000 (22:45 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Sun, 14 Aug 2016 20:45:31 +0000 (22:45 +0200)
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());
+    xbt_free(file->userdata());
 
     // Close the file
     delete file;