summaryrefslogtreecommitdiff
path: root/trust/tests
diff options
context:
space:
mode:
Diffstat (limited to 'trust/tests')
-rw-r--r--trust/tests/frob-nss-trust.c1
-rw-r--r--trust/tests/test-index.c7
2 files changed, 5 insertions, 3 deletions
diff --git a/trust/tests/frob-nss-trust.c b/trust/tests/frob-nss-trust.c
index fd74db7..fd69573 100644
--- a/trust/tests/frob-nss-trust.c
+++ b/trust/tests/frob-nss-trust.c
@@ -73,6 +73,7 @@ dump_object (P11KitIter *iter,
free (string);
free (label.pValue);
+ free (name);
}
static int
diff --git a/trust/tests/test-index.c b/trust/tests/test-index.c
index cf856ee..074ab2d 100644
--- a/trust/tests/test-index.c
+++ b/trust/tests/test-index.c
@@ -397,6 +397,7 @@ handles_are (CK_OBJECT_HANDLE *handles,
...)
{
CK_OBJECT_HANDLE handle;
+ bool matched = true;
int count;
int num;
va_list va;
@@ -410,7 +411,7 @@ handles_are (CK_OBJECT_HANDLE *handles,
va_start (va, handles);
- for (count = 0; true; count++) {
+ for (count = 0; matched; count++) {
handle = va_arg (va, CK_OBJECT_HANDLE);
if (handle == 0)
break;
@@ -421,12 +422,12 @@ handles_are (CK_OBJECT_HANDLE *handles,
}
if (handles[i] != handle)
- return false;
+ matched = false;
}
va_end (va);
- return (count == num);
+ return matched && (count == num);
}
static void