summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXimalas <trond.endrestol@ximalas.info>2021-10-02 13:27:01 +0200
committerBenBE <BenBE@geshi.org>2021-10-03 19:18:11 +0200
commit9eb52d593249a27ba9e9ddb983dc30412f209114 (patch)
treef8c3140e1b26c321a96a8a850e79fa6092942ff1
parent970885edc3553d6dd23a39cd56e1884b550f2d2a (diff)
Release memory for cmdline when Process_updateCmdline() returns.
This closes a nasty memory leak. There is at least another leak looming somewhere when Disk I/O is shown in the header area. That could very well be an issue within libdevstat native to FreeBSD.
-rw-r--r--freebsd/FreeBSDProcessList.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/freebsd/FreeBSDProcessList.c b/freebsd/FreeBSDProcessList.c
index 3067a88f..9bbfccba 100644
--- a/freebsd/FreeBSDProcessList.c
+++ b/freebsd/FreeBSDProcessList.c
@@ -444,6 +444,8 @@ static void FreeBSDProcessList_updateProcessName(kvm_t* kd, const struct kinfo_p
*at = '\0';
Process_updateCmdline(proc, cmdline, 0, end);
+
+ free(cmdline);
}
static char* FreeBSDProcessList_readJailName(const struct kinfo_proc* kproc) {

© 2014-2021 Faster IT GmbH | imprint | privacy policy