summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgumi <mekolat@users.noreply.github.com>2017-06-05 12:43:01 -0400
committergumi <mekolat@users.noreply.github.com>2017-06-05 14:12:46 -0400
commita3db4dc0aed6d4d008eaa5c985df73143b2f12ad (patch)
treeb900647f4ffb0cdd2bfb8357db7602eb60dc919a
parentffb073be8e4c2f21914298bb7b3edc569821f9cf (diff)
downloadhercules-s20170627.tar.gz
hercules-s20170627.tar.bz2
hercules-s20170627.tar.xz
hercules-s20170627.zip
fix memory leak introduced by 5ceccb7s20170627
-rw-r--r--src/map/script.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 01bd4d9b5..b22c88cfe 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -5033,6 +5033,8 @@ void do_final_script(void)
aFree(script->str_buf);
for( i = 0; i < atcommand->binding_count; i++ ) {
+ aFree(atcommand->binding[i]->at_groups);
+ aFree(atcommand->binding[i]->char_groups);
aFree(atcommand->binding[i]);
}
@@ -5567,6 +5569,8 @@ int script_reload(void)
script->label_count = 0;
for( i = 0; i < atcommand->binding_count; i++ ) {
+ aFree(atcommand->binding[i]->at_groups);
+ aFree(atcommand->binding[i]->char_groups);
aFree(atcommand->binding[i]);
}