X-Git-Url: https://plomlompom.com/repos/foo.html?a=blobdiff_plain;ds=inline;f=src%2Fclient%2Fcleanup.c;h=f4b97bfe6cef34c1aa0bfa721a22675ba48581a7;hb=edebb2bf9aa780ee2f7006c1d2be9168564d34df;hp=bcf52ac405e0a31ab41c5df4f85ea1e38d432d45;hpb=bdd8f79ade82ef1a7445580fa61a53fd1a5311db;p=plomrogue
diff --git a/src/client/cleanup.c b/src/client/cleanup.c
index bcf52ac..f4b97bf 100644
--- a/src/client/cleanup.c
+++ b/src/client/cleanup.c
@@ -4,8 +4,9 @@
#include /* for endwin() */
#include /* uint32_t */
#include /* free() */
+#include "../common/readwrite.h" /* try_fclose() */
#include "command_db.h" /* free_command_db() */
-#include "misc.h" /* unload_interface_conf() */
+#include "interface_conf.h" /* unload_interface_conf() */
#include "world.h" /* world global */
@@ -18,6 +19,7 @@ static uint32_t cleanup_flags = 0x0000;
extern void cleanup()
{
free(world.map.cells);
+ free(world.mem_map);
free(world.log);
free(world.player_inventory);
if (cleanup_flags & CLEANUP_INTERFACE)
@@ -32,6 +34,14 @@ extern void cleanup()
{
free_command_db();
}
+ if (cleanup_flags & CLEANUP_SERVER_IN)
+ {
+ try_fclose(world.file_server_in, __func__);
+ }
+ if (cleanup_flags & CLEANUP_SERVER_OUT)
+ {
+ try_fclose(world.file_server_out, __func__);
+ }
}