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/jailcheck/noexec.c | |
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/jailcheck/noexec.c')
-rw-r--r-- | src/jailcheck/noexec.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/jailcheck/noexec.c b/src/jailcheck/noexec.c index 37234c648..e5657135d 100644 --- a/src/jailcheck/noexec.c +++ b/src/jailcheck/noexec.c | |||
@@ -55,6 +55,7 @@ void noexec_setup(void) { | |||
55 | execfile_len = s.st_size; | 55 | execfile_len = s.st_size; |
56 | close(fd); | 56 | close(fd); |
57 | } | 57 | } |
58 | free(self); | ||
58 | } | 59 | } |
59 | } | 60 | } |
60 | 61 | ||
@@ -110,4 +111,5 @@ void noexec_test(const char *path) { | |||
110 | wait(&status); | 111 | wait(&status); |
111 | int rv = unlink(fname); | 112 | int rv = unlink(fname); |
112 | (void) rv; | 113 | (void) rv; |
114 | free(fname); | ||
113 | } | 115 | } |