mirror of
https://github.com/xzeldon/htop.git
synced 2024-12-24 15:15:44 +00:00
Memory leak on DragonFlyBSD when querying full command line
This commit is contained in:
parent
57c1538887
commit
9d8d87e1d5
@ -333,6 +333,7 @@ static void DragonFlyBSDProcessList_updateProcessName(kvm_t* kd, const struct ki
|
||||
}
|
||||
|
||||
char* cmdline = xMalloc(len);
|
||||
|
||||
char* at = cmdline;
|
||||
int end = 0;
|
||||
for (int i = 0; argv[i]; i++) {
|
||||
@ -346,6 +347,8 @@ static void DragonFlyBSDProcessList_updateProcessName(kvm_t* kd, const struct ki
|
||||
*at = '\0';
|
||||
|
||||
Process_updateCmdline(proc, cmdline, 0, end);
|
||||
|
||||
free(cmdline);
|
||||
}
|
||||
|
||||
static inline void DragonFlyBSDProcessList_scanJails(DragonFlyBSDProcessList* dfpl) {
|
||||
|
Loading…
Reference in New Issue
Block a user