summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/data_store.c7
-rw-r--r--src/data_store.h1
-rw-r--r--src/game.c2
3 files changed, 10 insertions, 0 deletions
diff --git a/src/data_store.c b/src/data_store.c
index e9cd782..eb8cb86 100644
--- a/src/data_store.c
+++ b/src/data_store.c
@@ -16,3 +16,10 @@ data_store_t* data_store(void)
return d;
}
+
+void destroy_data_store(void)
+{
+ free(d);
+ d = NULL;
+}
+
diff --git a/src/data_store.h b/src/data_store.h
index b2d75b4..0b4a33a 100644
--- a/src/data_store.h
+++ b/src/data_store.h
@@ -19,5 +19,6 @@ typedef struct
} data_store_t;
data_store_t *data_store(void);
+void destroy_data_store(void);
#endif // OXEN_DATA_STORE_H
diff --git a/src/game.c b/src/game.c
index 9810e9f..62d1155 100644
--- a/src/game.c
+++ b/src/game.c
@@ -159,4 +159,6 @@ void start_game(const bool servermode, const char* addr, const char* port)
ui_fini();
}
+
+ destroy_data_store();
}