aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2015-06-20 19:50:45 +0200
committerPřemysl Janouch <p.janouch@gmail.com>2015-06-20 19:53:18 +0200
commiteaecdda614bb6b42bf007ba3019257d191bfdd21 (patch)
treeaa0cd04c790f999b048478fbd769eea1ed047ef3
parent390b2832339d8a3799557d65835ded45d435eb4c (diff)
downloadxK-eaecdda614bb6b42bf007ba3019257d191bfdd21.tar.gz
xK-eaecdda614bb6b42bf007ba3019257d191bfdd21.tar.xz
xK-eaecdda614bb6b42bf007ba3019257d191bfdd21.zip
degesch: fix invalid free()
-rw-r--r--degesch.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/degesch.c b/degesch.c
index 2e6e436..079e750 100644
--- a/degesch.c
+++ b/degesch.c
@@ -396,8 +396,9 @@ input_destroy_buffer (struct input *self, struct input_buffer *buffer)
HISTORY_STATE *state = history_get_history_state ();
history_set_history_state (buffer->history);
- free (buffer->history);
rl_clear_history ();
+ free (buffer->history);
+ buffer->history = NULL;
history_set_history_state (state);
free (state);