about summary refs log tree commit diff stats
path: root/history.c
diff options
context:
space:
mode:
Diffstat (limited to 'history.c')
-rw-r--r--history.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/history.c b/history.c
index d47b5d07..9053b54f 100644
--- a/history.c
+++ b/history.c
@@ -20,6 +20,7 @@
  *
  */
 
+#include <stdlib.h>
 #include <string.h>
 
 #define MAX_HISTORY 100
@@ -30,6 +31,10 @@ static int _pos;
 
 void history_init(void)
 {
+    int i;
+    for (i = 0; i < _size; i++)
+        free(_history[i]);
+    
     _size = 0;
     _pos = -1;
 }