[Bug 16324] New: Busybox bootchartd_c memory leak

bugzilla at busybox.net bugzilla at busybox.net
Sun Mar 16 06:34:18 UTC 2025


https://bugs.busybox.net/show_bug.cgi?id=16324

            Bug ID: 16324
           Summary: Busybox bootchartd_c memory leak
           Product: Busybox
           Version: 1.36.x
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P5
         Component: Standard Compliance
          Assignee: unassigned at busybox.net
          Reporter: sergeygubarev263 at gmail.com
                CC: busybox-cvs at busybox.net
  Target Milestone: ---

Good day.

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

---

 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)
--

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the busybox-cvs mailing list