diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2009-06-21 12:45:50 +0200 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2009-06-21 12:45:50 +0200 |
commit | 679e477abb7ce6f0588027bcf3e67aca8cfe3f11 (patch) | |
tree | 7fdcd9f82a4639b9f452093544bb9c2644bd7d68 /src/core | |
parent | b698a9ce4a2fa10166fb901c6d68cbea5dc15341 (diff) | |
download | weechat-679e477abb7ce6f0588027bcf3e67aca8cfe3f11.zip |
Fix some memory leaks in command hook (completion templates), buffer closing, partial completion
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/wee-hook.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/core/wee-hook.c b/src/core/wee-hook.c index a18883c06..e36b46f40 100644 --- a/src/core/wee-hook.c +++ b/src/core/wee-hook.c @@ -483,6 +483,7 @@ hook_command_build_completion (struct t_hook_command *hook_command) } } } + weelist_free (list); } } @@ -2176,8 +2177,22 @@ unhook (struct t_hook *hook) } free (HOOK_COMMAND(hook, cplt_templates)); } + if (HOOK_COMMAND(hook, cplt_templates_static)) + free (HOOK_COMMAND(hook, cplt_templates_static)); if (HOOK_COMMAND(hook, cplt_template_num_args)) free (HOOK_COMMAND(hook, cplt_template_num_args)); + if (HOOK_COMMAND(hook, cplt_template_args)) + free (HOOK_COMMAND(hook, cplt_template_args)); + if (HOOK_COMMAND(hook, cplt_template_args_concat)) + { + for (i = 0; + i < HOOK_COMMAND(hook, cplt_template_num_args_concat); + i++) + { + free (HOOK_COMMAND(hook, cplt_template_args_concat[i])); + } + free (HOOK_COMMAND(hook, cplt_template_args_concat)); + } break; case HOOK_TYPE_COMMAND_RUN: if (HOOK_COMMAND_RUN(hook, command)) |