diff options
-rw-r--r-- | procps/top.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/procps/top.c b/procps/top.c index 73cd285f0..6f7f7d382 100644 --- a/procps/top.c +++ b/procps/top.c | |||
@@ -728,12 +728,6 @@ static void reset_term(void) | |||
728 | { | 728 | { |
729 | if (!OPT_BATCH_MODE) | 729 | if (!OPT_BATCH_MODE) |
730 | tcsetattr_stdin_TCSANOW(&initial_settings); | 730 | tcsetattr_stdin_TCSANOW(&initial_settings); |
731 | if (ENABLE_FEATURE_CLEAN_UP) { | ||
732 | clearmems(); | ||
733 | # if ENABLE_FEATURE_TOP_CPU_USAGE_PERCENTAGE | ||
734 | free(prev_hist); | ||
735 | # endif | ||
736 | } | ||
737 | } | 731 | } |
738 | 732 | ||
739 | static void sig_catcher(int sig) | 733 | static void sig_catcher(int sig) |
@@ -1258,5 +1252,11 @@ int top_main(int argc UNUSED_PARAM, char **argv) | |||
1258 | #if ENABLE_FEATURE_USE_TERMIOS | 1252 | #if ENABLE_FEATURE_USE_TERMIOS |
1259 | reset_term(); | 1253 | reset_term(); |
1260 | #endif | 1254 | #endif |
1255 | if (ENABLE_FEATURE_CLEAN_UP) { | ||
1256 | clearmems(); | ||
1257 | #if ENABLE_FEATURE_TOP_CPU_USAGE_PERCENTAGE | ||
1258 | free(prev_hist); | ||
1259 | #endif | ||
1260 | } | ||
1261 | return EXIT_SUCCESS; | 1261 | return EXIT_SUCCESS; |
1262 | } | 1262 | } |