diff options
author | Ilya Pankratov <90714492+i-pankrat@users.noreply.github.com> | 2024-06-05 20:16:01 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-05 17:16:01 +0000 |
commit | 03ea436e1cb35fdcba8fb6588de209d0a10174e9 (patch) | |
tree | 170711d3f7db2c7a6ca92213dc56aa33f26465fb /src/firemon | |
parent | build(deps): bump step-security/harden-runner from 2.7.1 to 2.8.0 (diff) | |
download | firejail-03ea436e1cb35fdcba8fb6588de209d0a10174e9.tar.gz firejail-03ea436e1cb35fdcba8fb6588de209d0a10174e9.tar.zst firejail-03ea436e1cb35fdcba8fb6588de209d0a10174e9.zip |
bugfix: fix various resource leaks (#6367)
Fix memory and descriptor leaks.
Signed-off-by: Ilya Pankratov <i.pankratov.main@gmail.com>
Diffstat (limited to 'src/firemon')
-rw-r--r-- | src/firemon/netstats.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/firemon/netstats.c b/src/firemon/netstats.c index 39dc38ec9..e70174b1e 100644 --- a/src/firemon/netstats.c +++ b/src/firemon/netstats.c | |||
@@ -152,10 +152,12 @@ static void print_proc(int index, int itv, int col) { | |||
152 | struct stat s; | 152 | struct stat s; |
153 | if (stat(name, &s) == -1) { | 153 | if (stat(name, &s) == -1) { |
154 | // the sandbox doesn't have a --net= option, don't print | 154 | // the sandbox doesn't have a --net= option, don't print |
155 | free(name); | ||
155 | if (cmd) | 156 | if (cmd) |
156 | free(cmd); | 157 | free(cmd); |
157 | return; | 158 | return; |
158 | } | 159 | } |
160 | free(name); | ||
159 | 161 | ||
160 | // pid | 162 | // pid |
161 | char pidstr[11]; | 163 | char pidstr[11]; |