summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoram Schrijver <i@joram.io>2020-05-22 14:49:40 +0200
committerSébastien Helleu <flashcode@flashtux.org>2020-06-07 11:07:03 +0200
commit297a140beac745d68149c4d74fefbddc727264b6 (patch)
tree16271b68c774f94bc7ed9e1b619e9ccdfbc5f4a4
parentcb5d90dcc7174a69cf3a300d35575a6711f8a077 (diff)
downloadweechat-297a140beac745d68149c4d74fefbddc727264b6.zip
guile: fix memory leak in output port
-rw-r--r--src/plugins/guile/weechat-guile.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/guile/weechat-guile.c b/src/plugins/guile/weechat-guile.c
index 2c1ed139c..d1ff8b8fc 100644
--- a/src/plugins/guile/weechat-guile.c
+++ b/src/plugins/guile/weechat-guile.c
@@ -1188,6 +1188,8 @@ weechat_guile_port_write (SCM port, SCM src, size_t start, size_t count)
}
weechat_string_dyn_concat (guile_buffer_output, ptr_data);
+ free (data2);
+
return count;
}
#else
@@ -1217,6 +1219,8 @@ weechat_guile_port_write (SCM port, const void *data, size_t size)
ptr_data = ++ptr_newline;
}
weechat_string_dyn_concat (guile_buffer_output, ptr_data);
+
+ free (data2);
}
#endif