summaryrefslogtreecommitdiff
path: root/p11-kit
diff options
context:
space:
mode:
Diffstat (limited to 'p11-kit')
-rw-r--r--p11-kit/iter.c12
-rw-r--r--p11-kit/p11-kit.c6
-rw-r--r--p11-kit/tests/test-init.c3
3 files changed, 15 insertions, 6 deletions
diff --git a/p11-kit/iter.c b/p11-kit/iter.c
index a59944a..124d990 100644
--- a/p11-kit/iter.c
+++ b/p11-kit/iter.c
@@ -87,12 +87,12 @@ struct p11_kit_iter {
CK_OBJECT_HANDLE object;
/* And various flags */
- int searching : 1;
- int searched : 1;
- int iterating : 1;
- int match_nothing : 1;
- int keep_session : 1;
- int preload_results : 1;
+ unsigned int searching : 1;
+ unsigned int searched : 1;
+ unsigned int iterating : 1;
+ unsigned int match_nothing : 1;
+ unsigned int keep_session : 1;
+ unsigned int preload_results : 1;
};
/**
diff --git a/p11-kit/p11-kit.c b/p11-kit/p11-kit.c
index 28c6f4a..34b9476 100644
--- a/p11-kit/p11-kit.c
+++ b/p11-kit/p11-kit.c
@@ -84,6 +84,9 @@ p11_kit_external (int argc,
/* At this point we have no command */
p11_message ("'%s' is not a valid command. See 'p11-kit --help'", argv[0]);
+
+ free (filename);
+ free (path);
return 2;
}
@@ -109,6 +112,9 @@ p11_kit_extract (int argc,
/* At this point we have no command */
p11_message ("'%s' is not a valid command. See 'p11-kit --help'", argv[0]);
+
+ free (path);
+ free (args);
return 2;
}
diff --git a/p11-kit/tests/test-init.c b/p11-kit/tests/test-init.c
index 76805ee..ebc0666 100644
--- a/p11-kit/tests/test-init.c
+++ b/p11-kit/tests/test-init.c
@@ -233,8 +233,11 @@ test_threaded_initialization (void)
module.C_Finalize = mock_C_Finalize__threaded_race;
memset (&data, 0, sizeof (data));
+
+ p11_mutex_lock (&race_mutex);
initialization_count = 0;
finalization_count = 0;
+ p11_mutex_unlock (&race_mutex);
p11_lock ();