summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Moore <pmoore@redhat.com>2015-08-24 18:47:33 -0400
committerPaul Moore <pmoore@redhat.com>2015-08-27 15:32:49 -0400
commit1d63fad4a064b80e0b921b16ed419f3342337ed4 (patch)
treeffc018a384e4408e69420104a3efb0d088a44bb1
parent8224c0c181ff7dd6383cd18ce9b4e168ad8c9ff0 (diff)
downloadlibseccomp-1d63fad4a064b80e0b921b16ed419f3342337ed4.tar.gz
arch: fix a problem with the rule rewrites in _seccomp_rule_add()
A typo was causing the return value from arch_fitler_rewrite() to be ignored in cases where -EDOM was returned. Signed-off-by: Paul Moore <pmoore@redhat.com>
-rw-r--r--src/api.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/api.c b/src/api.c
index 182b896..a16d4c2 100644
--- a/src/api.c
+++ b/src/api.c
@@ -483,7 +483,7 @@ static int _seccomp_rule_add(struct db_filter_col *col,
/* mangle the private chain copy */
rc_tmp = arch_filter_rewrite(filter->arch, strict,
&sc_tmp, chain_tmp);
- if ((rc == -EDOM) && (!strict)) {
+ if ((rc_tmp == -EDOM) && (!strict)) {
free(chain_tmp);
continue;
}