diff options
author | Paul Moore <pmoore@redhat.com> | 2014-04-23 18:34:49 -0400 |
---|---|---|
committer | Paul Moore <pmoore@redhat.com> | 2014-05-01 14:15:49 -0400 |
commit | 42badbc70fc93b622b9aa2dba74f434d0334a870 (patch) | |
tree | 50886e643d3da9a73b67939d9a61845f2d5fbd45 /tests/14-sim-reset.c | |
parent | 0fa292323f4b214a0c2f17206f183719fe382215 (diff) | |
download | libseccomp-42badbc70fc93b622b9aa2dba74f434d0334a870.tar.gz |
tests: correctly return an error if seccomp_init() fails
Signed-off-by: Paul Moore <pmoore@redhat.com>
Diffstat (limited to 'tests/14-sim-reset.c')
-rw-r--r-- | tests/14-sim-reset.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/14-sim-reset.c b/tests/14-sim-reset.c index c87ba13..039974f 100644 --- a/tests/14-sim-reset.c +++ b/tests/14-sim-reset.c @@ -19,6 +19,7 @@ * along with this library; if not, see <http://www.gnu.org/licenses>. */ +#include <errno.h> #include <unistd.h> #include <seccomp.h> @@ -37,8 +38,7 @@ int main(int argc, char *argv[]) ctx = seccomp_init(SCMP_ACT_KILL); if (ctx == NULL) - goto out; - + return ENOMEM; rc = seccomp_rule_add_exact(ctx, SCMP_ACT_ALLOW, SCMP_SYS(read), 0); if (rc != 0) |