1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-01 07:16:37 +02:00

Fix memory leak when sending modifier "input_text_content"

This commit is contained in:
Sebastien Helleu
2009-04-05 14:36:10 +02:00
parent 6fc8a25d6e
commit 9084984861
+7 -3
View File
@@ -132,10 +132,14 @@ gui_input_text_changed_modifier_and_signal (struct t_gui_buffer *buffer)
str_buffer,
(buffer->input_buffer) ?
buffer->input_buffer : "");
if (new_input && (strcmp (new_input, buffer->input_buffer) != 0))
if (new_input)
{
/* input has been changed by modifier, use it */
gui_input_replace_input (buffer, new_input);
if (strcmp (new_input, buffer->input_buffer) != 0)
{
/* input has been changed by modifier, use it */
gui_input_replace_input (buffer, new_input);
}
free (new_input);
}
/* send signal */