aboutsummaryrefslogtreecommitdiff
path: root/procps/top.c
diff options
context:
space:
mode:
Diffstat (limited to 'procps/top.c')
-rw-r--r--procps/top.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/procps/top.c b/procps/top.c
index 5c41e8e10..8d39526ff 100644
--- a/procps/top.c
+++ b/procps/top.c
@@ -979,9 +979,11 @@ static unsigned handle_input(unsigned scan_mask, duration_t interval)
IF_FEATURE_TOPMEM(&& scan_mask != TOPMEM_MASK)
) {
scan_mask ^= PSSCAN_TASKS;
+# if ENABLE_FEATURE_TOP_CPU_USAGE_PERCENTAGE
free(prev_hist);
prev_hist = NULL;
prev_hist_count = 0;
+# endif
continue;
}
# endif