summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2009-04-05 14:36:10 +0200
committerSebastien Helleu <flashcode@flashtux.org>2009-04-05 14:36:10 +0200
commit90849848612a04019e076990174ecb5c05987236 (patch)
tree06b1f548136ad45c2797ac0981cd7a9a7aa9cb48 /src/gui
parent6fc8a25d6ece87b831d55c219cbeae005779f8a5 (diff)
downloadweechat-90849848612a04019e076990174ecb5c05987236.zip
Fix memory leak when sending modifier "input_text_content"
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/gui-input.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/gui/gui-input.c b/src/gui/gui-input.c
index 6cfd9f34c..8845275e8 100644
--- a/src/gui/gui-input.c
+++ b/src/gui/gui-input.c
@@ -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 */