From: suter Date: Sat, 5 Oct 2013 15:02:28 +0000 (+0200) Subject: leak-- clean things at the MSG level when unlinking a file as X-Git-Tag: v3_9_90~39^2~7 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/4dc80b930b1f90e84652ae4ac01957aceb5a574e leak-- clean things at the MSG level when unlinking a file as MSG_file_close wont be called. --- diff --git a/src/msg/msg_io.c b/src/msg/msg_io.c index 1d4c19e05c..31aa42031d 100644 --- a/src/msg/msg_io.c +++ b/src/msg/msg_io.c @@ -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