mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
Merge pull request #6846 from grey3228/fix/procevent_monitor_cmd_double_free
bugfix: firemon: avoid cmd double-free in procevent_monitor
This commit is contained in:
commit
9ca94eafd1
1 changed files with 3 additions and 1 deletions
|
|
@ -496,7 +496,9 @@ static void __attribute__((noreturn)) procevent_monitor(const int sock, pid_t my
|
|||
sprintf(lineptr, "\n");
|
||||
else {
|
||||
sprintf(lineptr, " %s\n", cmd);
|
||||
free(cmd);
|
||||
if (cmd != pids[pid].option.event.cmd) {
|
||||
free(cmd);
|
||||
}
|
||||
}
|
||||
lineptr += strlen(lineptr);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue