[PATCH] top: fix double free causing a SIGABRT storm after SIGPIPE
Rob Landley
rob at landley.net
Fri Aug 19 18:17:25 UTC 2016
On 08/19/2016 04:10 AM, Denys Vlasenko wrote:
> + if (ENABLE_FEATURE_CLEAN_UP) {
> + clearmems();
> +#if ENABLE_FEATURE_TOP_CPU_USAGE_PERCENTAGE
> + free(prev_hist);
> +#endif
> + }
The point of the ENABLE macros was so that you can go:
if (ENABLE_FEATURE_TOP_CPU_USAGE_PERCENTAGE)
free(prev_hist);
Instead of the #ifdef forest. #ifdef CONFIG_FEATURE_BLAH already existed...
Rob
More information about the busybox
mailing list