summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2018-08-15 09:32:56 +0200
committerSébastien Helleu <flashcode@flashtux.org>2018-08-15 09:32:56 +0200
commitbb8ac59c32a82bda8c2904c1ad24a8ed97a3800c (patch)
tree037c795f1dfbe6f8ef16fc15030ffdd45cafb0c9 /src
parent51bda896c8ec4c8b424ba731944758bbae9e5855 (diff)
downloadweechat-bb8ac59c32a82bda8c2904c1ad24a8ed97a3800c.zip
core: fix memory leak when removing a line hook
Diffstat (limited to 'src')
-rw-r--r--src/core/hook/wee-hook-line.c5
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));