diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2018-08-15 09:32:56 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2018-08-15 09:32:56 +0200 |
commit | bb8ac59c32a82bda8c2904c1ad24a8ed97a3800c (patch) | |
tree | 037c795f1dfbe6f8ef16fc15030ffdd45cafb0c9 /src | |
parent | 51bda896c8ec4c8b424ba731944758bbae9e5855 (diff) | |
download | weechat-bb8ac59c32a82bda8c2904c1ad24a8ed97a3800c.zip |
core: fix memory leak when removing a line hook
Diffstat (limited to 'src')
-rw-r--r-- | src/core/hook/wee-hook-line.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/hook/wee-hook-line.c b/src/core/hook/wee-hook-line.c index d65fb5e6d..a3a96b718 100644 --- a/src/core/hook/wee-hook-line.c +++ b/src/core/hook/wee-hook-line.c @@ -187,6 +187,11 @@ hook_line_free_data (struct t_hook *hook) if (!hook || !hook->hook_data) return; + if (HOOK_LINE(hook, buffers)) + { + string_free_split (HOOK_LINE(hook, buffers)); + HOOK_LINE(hook, buffers) = NULL; + } if (HOOK_LINE(hook, tags_array)) { string_free_split_tags (HOOK_LINE(hook, tags_array)); |