From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52402) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VtKIP-0006vt-7e for qemu-devel@nongnu.org; Wed, 18 Dec 2013 11:48:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VtKIG-0005ET-B6 for qemu-devel@nongnu.org; Wed, 18 Dec 2013 11:48:29 -0500 Received: from e8.ny.us.ibm.com ([32.97.182.138]:47317) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VtKIG-0005Du-71 for qemu-devel@nongnu.org; Wed, 18 Dec 2013 11:48:20 -0500 Received: from /spool/local by e8.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 18 Dec 2013 11:48:17 -0500 Received: from b01cxnp23034.gho.pok.ibm.com (b01cxnp23034.gho.pok.ibm.com [9.57.198.29]) by d01dlp01.pok.ibm.com (Postfix) with ESMTP id 2ED2B38C804A for ; Wed, 18 Dec 2013 11:48:12 -0500 (EST) Received: from d01av01.pok.ibm.com (d01av01.pok.ibm.com [9.56.224.215]) by b01cxnp23034.gho.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id rBIGmDRp3211640 for ; Wed, 18 Dec 2013 16:48:14 GMT Received: from d01av01.pok.ibm.com (localhost [127.0.0.1]) by d01av01.pok.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id rBIGmDhG005210 for ; Wed, 18 Dec 2013 11:48:13 -0500 From: Corey Bryant Date: Wed, 18 Dec 2013 11:48:11 -0500 Message-Id: <1387385291-7825-1-git-send-email-coreyb@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH] seccomp: exit if seccomp_init() fails List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: pmoore@redhat.com, Corey Bryant , aliguori@amazon.com, otubo@linux.vnet.ibm.com This fixes a bug where we weren't exiting if seccomp_init() failed. Signed-off-by: Corey Bryant --- qemu-seccomp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/qemu-seccomp.c b/qemu-seccomp.c index cf07869..b7c1253 100644 --- a/qemu-seccomp.c +++ b/qemu-seccomp.c @@ -231,6 +231,7 @@ int seccomp_start(void) ctx = seccomp_init(SCMP_ACT_KILL); if (ctx == NULL) { + rc = -1; goto seccomp_return; } -- 1.8.1.4