浏览代码

seccomp: exit if seccomp_init() fails

This fixes a bug where we weren't exiting if seccomp_init() failed.

Signed-off-by: Corey Bryant <coreyb@linux.vnet.ibm.com>
Acked-by: Eduardo Otubo <otubo@linux.vnet.ibm.com>
Acked-by: Paul Moore <pmoore@redhat.com>
Corey Bryant 11 年之前
父节点
当前提交
2a13f99112
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      qemu-seccomp.c

+ 1 - 0
qemu-seccomp.c

@@ -231,6 +231,7 @@ int seccomp_start(void)
 
 
     ctx = seccomp_init(SCMP_ACT_KILL);
     ctx = seccomp_init(SCMP_ACT_KILL);
     if (ctx == NULL) {
     if (ctx == NULL) {
+        rc = -1;
         goto seccomp_return;
         goto seccomp_return;
     }
     }