diff options
Diffstat (limited to 'history.c')
-rw-r--r-- | history.c | 5 |
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; } |