diff options
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) |