summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-02-28 15:19:28 +0300
committerAndrei Karas <akaras@inbox.ru>2015-02-28 15:19:28 +0300
commit594452c2495b2bc3e376a4b927f5992f9fc8b5db (patch)
tree665b32819c5f30669992f4f2b6d7190f329c1abf /src/common
parent974af7e3663c5f72091f8afd91e4ed732c42b20c (diff)
downloadevol-hercules-594452c2495b2bc3e376a4b927f5992f9fc8b5db.tar.gz
evol-hercules-594452c2495b2bc3e376a4b927f5992f9fc8b5db.tar.bz2
evol-hercules-594452c2495b2bc3e376a4b927f5992f9fc8b5db.tar.xz
evol-hercules-594452c2495b2bc3e376a4b927f5992f9fc8b5db.zip
fix default map name memory leak on exit.
Diffstat (limited to 'src/common')
-rw-r--r--src/common/init.c6
-rw-r--r--src/common/init.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/src/common/init.c b/src/common/init.c
index 9b70e50..07bb936 100644
--- a/src/common/init.c
+++ b/src/common/init.c
@@ -36,3 +36,9 @@ void setDefaultMap(void)
mapindex->default_x = 80;
mapindex->default_y = 109;
}
+
+void commonClean(void)
+{
+ aFree(mapindex->default_map);
+ mapindex->default_map = NULL;
+}
diff --git a/src/common/init.h b/src/common/init.h
index bd86f5b..41f844c 100644
--- a/src/common/init.h
+++ b/src/common/init.h
@@ -6,5 +6,6 @@
void interfaces_init_common(void);
void setDefaultMap(void);
+void commonClean(void);
#endif // EVOL_COMMON_INTERFACES