summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorcelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-03-27 10:30:49 +0000
committercelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-03-27 10:30:49 +0000
commit1395e61afc8c3cf2e5e128e258083ea73b33e998 (patch)
tree952dd161317d1345c33e4d67950502630d9b4ba2 /src/common
parent4ad0ecb12427cbad21dd7449699f1646dd57cf09 (diff)
downloadhercules-1395e61afc8c3cf2e5e128e258083ea73b33e998.tar.gz
hercules-1395e61afc8c3cf2e5e128e258083ea73b33e998.tar.bz2
hercules-1395e61afc8c3cf2e5e128e258083ea73b33e998.tar.xz
hercules-1395e61afc8c3cf2e5e128e258083ea73b33e998.zip
* Fixed some memory leaks with the new timer changes
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@1304 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/common')
-rw-r--r--src/common/timer.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/common/timer.c b/src/common/timer.c
index 90b4e901e..954582134 100644
--- a/src/common/timer.c
+++ b/src/common/timer.c
@@ -292,7 +292,17 @@ int do_timer(unsigned int tick) {
}
void timer_final() {
- //FREE(timer_data);
- aFree(timer_data);
+ struct timer_func_list* tfl = tfl_root, *tfl2;
+
+ while (tfl) {
+ tfl2 = tfl;
+ aFree(tfl->name);
+ aFree(tfl);
+ tfl = tfl2->next;
+ }
+
+ if (timer_data) aFree(timer_data);
+ if (timer_heap) aFree(timer_heap);
+ if (free_timer_list) aFree(free_timer_list);
}