Good day, dear maintainer.

There may be a memory leak due to an explicitly unclosed proc_ps descriptor.
I propose a possible solution to the issue.

I will be glad of any feedback.

---
 busybox/init/bootchartd.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/busybox/init/bootchartd.c b/busybox/init/bootchartd.c
index ae1ee9d..eb1b62b 100644
--- a/busybox/init/bootchartd.c
+++ b/busybox/init/bootchartd.c
@@ -260,6 +260,7 @@ static void do_logging(unsigned sample_period_us, int
process_accounting)
  wait_more:
                usleep(sample_period_us);
        }
+       fclose(proc_ps);
 }

 static void finalize(char *tempdir, const char *prog, int
process_accounting)
--
2.30.2
_______________________________________________
busybox mailing list
[email protected]
https://lists.busybox.net/mailman/listinfo/busybox

Reply via email to