diff options
Diffstat (limited to 'kernel/seccomp.c')
-rw-r--r-- | kernel/seccomp.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/seccomp.c b/kernel/seccomp.c index d7f538847b84..e815781ed751 100644 --- a/kernel/seccomp.c +++ b/kernel/seccomp.c | |||
@@ -976,6 +976,9 @@ static int seccomp_notify_release(struct inode *inode, struct file *file) | |||
976 | struct seccomp_filter *filter = file->private_data; | 976 | struct seccomp_filter *filter = file->private_data; |
977 | struct seccomp_knotif *knotif; | 977 | struct seccomp_knotif *knotif; |
978 | 978 | ||
979 | if (!filter) | ||
980 | return 0; | ||
981 | |||
979 | mutex_lock(&filter->notify_lock); | 982 | mutex_lock(&filter->notify_lock); |
980 | 983 | ||
981 | /* | 984 | /* |
@@ -1300,6 +1303,7 @@ out: | |||
1300 | out_put_fd: | 1303 | out_put_fd: |
1301 | if (flags & SECCOMP_FILTER_FLAG_NEW_LISTENER) { | 1304 | if (flags & SECCOMP_FILTER_FLAG_NEW_LISTENER) { |
1302 | if (ret < 0) { | 1305 | if (ret < 0) { |
1306 | listener_f->private_data = NULL; | ||
1303 | fput(listener_f); | 1307 | fput(listener_f); |
1304 | put_unused_fd(listener); | 1308 | put_unused_fd(listener); |
1305 | } else { | 1309 | } else { |