]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
seccomp: exit if seccomp_init() fails
authorCorey Bryant <coreyb@linux.vnet.ibm.com>
Wed, 18 Dec 2013 16:48:11 +0000 (11:48 -0500)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Fri, 21 Feb 2014 06:34:40 +0000 (00:34 -0600)
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>
(cherry picked from commit 2a13f991123fa16841e6d94b02a9cc2c76d91725)

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
qemu-seccomp.c

index 69cee443afaff5813c5533c7739de0bb7e6d274f..7c7b4742a6824a9622d1f5b2019ceae30f3c971e 100644 (file)
@@ -230,6 +230,7 @@ int seccomp_start(void)
 
     ctx = seccomp_init(SCMP_ACT_KILL);
     if (ctx == NULL) {
+        rc = -1;
         goto seccomp_return;
     }