summaryrefslogtreecommitdiff
path: root/p11-kit
diff options
context:
space:
mode:
authorStef Walter <stef@thewalter.net>2014-06-25 10:55:10 +0200
committerStef Walter <stef@thewalter.net>2014-06-25 10:58:37 +0200
commit6527f5d3b24a96369a24281db7593d5c4fc73408 (patch)
tree006bf9345c04523a763d6acd780c01a165f2add7 /p11-kit
parentd21967cdcd18c8fcb749f874c492b7f6c4965817 (diff)
p11-kit: Fix corrupted list when initialization of modules fail
This fixes the function call p11_kit_module_initialize() to correctly rearrange the modules array when initializing a module fails. Also fixes p11_kit_modules_load_and_initialize()
Diffstat (limited to 'p11-kit')
-rw-r--r--p11-kit/modules.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/p11-kit/modules.c b/p11-kit/modules.c
index b373544..2988f31 100644
--- a/p11-kit/modules.c
+++ b/p11-kit/modules.c
@@ -1985,6 +1985,8 @@ p11_kit_modules_initialize (CK_FUNCTION_LIST **modules,
failure_callback (modules[i]);
out--;
free (name);
+ } else {
+ modules[out] = modules[i];
}
}