Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
leak-- clean things at the MSG level when unlinking a file as
authorsuter <frederic.suter@cc.in2p3.fr>
Sat, 5 Oct 2013 15:02:28 +0000 (17:02 +0200)
committersuter <frederic.suter@cc.in2p3.fr>
Sun, 6 Oct 2013 16:41:03 +0000 (18:41 +0200)
MSG_file_close wont be called.

src/msg/msg_io.c

index 1d4c19e..31aa420 100644 (file)
@@ -146,7 +146,12 @@ int MSG_file_close(msg_file_t fd)
  */
 int MSG_file_unlink(msg_file_t fd)
 {
-  return simcall_file_unlink(fd->simdata->smx_file);
+  int res = simcall_file_unlink(fd->simdata->smx_file);
+  free(fd->fullname);
+  xbt_free(fd->simdata);
+  xbt_free(fd->info);
+  xbt_free(fd);
+  return res;
 }
 
 /** \ingroup msg_file_management