diff --git a/src/scitokens.cpp b/src/scitokens.cpp index 6c79ab8..f46f05c 100644 --- a/src/scitokens.cpp +++ b/src/scitokens.cpp @@ -554,7 +554,7 @@ void enforcer_destroy(Enforcer enf) { void enforcer_acl_free(Acl *acls) { for (int idx = 0; - acls[idx].authz == nullptr && acls[idx].resource == nullptr; idx++) { + acls[idx].authz != nullptr || acls[idx].resource != nullptr; idx++) { free(const_cast(acls[idx].authz)); free(const_cast(acls[idx].resource)); }