summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
authorLance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-22 12:38:12 +0000
committerLance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-22 12:38:12 +0000
commit22e1db931f45226b27f7b84e0c1e183aaef56842 (patch)
tree5e00e0dd38a4b2d20f3dfd397fd10857d3a0950a /src/map/script.c
parentde7175c5bc24b6e8f3b87540ae93f40a75df2df2 (diff)
downloadhercules-22e1db931f45226b27f7b84e0c1e183aaef56842.tar.gz
hercules-22e1db931f45226b27f7b84e0c1e183aaef56842.tar.bz2
hercules-22e1db931f45226b27f7b84e0c1e183aaef56842.tar.xz
hercules-22e1db931f45226b27f7b84e0c1e183aaef56842.zip
- Fixed some of the leaks.. still fixing..
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6691 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 413468eb7..777714a84 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -11882,6 +11882,15 @@ int script_config_read(char *cfgName)
return script_config_read_sub(cfgName);
}
+static int do_final_userfunc_sub (DBKey key,void *data,va_list ap){
+ struct script_code *code = (struct script_code *)data;
+ if(code){
+ script_free_vars( &code->script_vars );
+ aFree( code->script_buf );
+ }
+ return 0;
+}
+
/*==========================================
* I
*------------------------------------------
@@ -11894,7 +11903,7 @@ int do_final_script()
mapreg_db->destroy(mapreg_db,NULL);
mapregstr_db->destroy(mapregstr_db,NULL);
scriptlabel_db->destroy(scriptlabel_db,NULL);
- userfunc_db->destroy(userfunc_db,NULL);
+ userfunc_db->destroy(userfunc_db,do_final_userfunc_sub);
if(sleep_db) {
struct linkdb_node *n = (struct linkdb_node *)sleep_db;
while(n) {