Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
plug a memleak
authorMartin Quinson <martin.quinson@loria.fr>
Mon, 19 Jun 2017 12:13:22 +0000 (14:13 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Mon, 19 Jun 2017 12:20:38 +0000 (14:20 +0200)
examples/msg/synchro-semaphore/synchro-semaphore.c

index d91e546..f4312d8 100644 (file)
@@ -67,6 +67,7 @@ int main(int argc, char* argv[])
   MSG_process_create_with_arguments("Bob", peer, NULL, h, 8, bobTimes);
 
   msg_error_t res = MSG_main();
   MSG_process_create_with_arguments("Bob", peer, NULL, h, 8, bobTimes);
 
   msg_error_t res = MSG_main();
+  MSG_sem_destroy(sem);
   XBT_INFO("Finished\n");
   return (res != MSG_OK);
 }
   XBT_INFO("Finished\n");
   return (res != MSG_OK);
 }