diff options
author | 2018-09-06 07:23:28 -0400 | |
---|---|---|
committer | 2018-09-06 07:23:28 -0400 | |
commit | 5a87f3e8b11e3ee80ddee5e4d037a0a7dc087561 (patch) | |
tree | 593e9f52d2df1e24961af04377320e4d073693dc /src/libpostexecseccomp | |
parent | mainline merge (diff) | |
download | firejail-5a87f3e8b11e3ee80ddee5e4d037a0a7dc087561.tar.gz firejail-5a87f3e8b11e3ee80ddee5e4d037a0a7dc087561.tar.zst firejail-5a87f3e8b11e3ee80ddee5e4d037a0a7dc087561.zip |
mainline merges
Diffstat (limited to 'src/libpostexecseccomp')
-rw-r--r-- | src/libpostexecseccomp/libpostexecseccomp.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libpostexecseccomp/libpostexecseccomp.c b/src/libpostexecseccomp/libpostexecseccomp.c index de64d50c5..856adb8fe 100644 --- a/src/libpostexecseccomp/libpostexecseccomp.c +++ b/src/libpostexecseccomp/libpostexecseccomp.c | |||
@@ -32,8 +32,10 @@ static void load_seccomp(void) { | |||
32 | return; | 32 | return; |
33 | 33 | ||
34 | off_t size = lseek(fd, 0, SEEK_END); | 34 | off_t size = lseek(fd, 0, SEEK_END); |
35 | if (size <= 0) | 35 | if (size <= 0) { |
36 | close(fd); | ||
36 | return; | 37 | return; |
38 | } | ||
37 | unsigned short entries = (unsigned short) size / (unsigned short) sizeof(struct sock_filter); | 39 | unsigned short entries = (unsigned short) size / (unsigned short) sizeof(struct sock_filter); |
38 | struct sock_filter *filter = MAP_FAILED; | 40 | struct sock_filter *filter = MAP_FAILED; |
39 | if (size != 0) | 41 | if (size != 0) |