From 51cbe780f32bb4d1bb2740f63c111e05fb0d7ee0 Mon Sep 17 00:00:00 2001 From: andersen Date: Tue, 25 Jul 2000 18:01:20 +0000 Subject: Use BB_FEATURE_CLEAN_UP where appropriate -Erik git-svn-id: svn://busybox.net/trunk/busybox@904 69ca8d6d-28ef-0310-b511-8ec308f3f277 --- shell/cmdedit.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'shell') diff --git a/shell/cmdedit.c b/shell/cmdedit.c index 0de18e81f..0ce64beeb 100644 --- a/shell/cmdedit.c +++ b/shell/cmdedit.c @@ -115,6 +115,18 @@ void cmdedit_reset_term(void) if (reset_term) /* sparc and other have broken termios support: use old termio handling. */ setTermSettings(fileno(stdin), (void*) &initial_settings); +#ifdef BB_FEATURE_CLEAN_UP + if (his_front) { + struct history *n; + //while(his_front!=his_end) { + while(his_front!=his_end) { + n = his_front->n; + free(his_front->s); + free(his_front); + his_front=n; + } + } +#endif } void clean_up_and_die(int sig) -- cgit v1.2.3-55-g6feb