Skip to content

Commit

Permalink
modules: p11_kit_initialize_module: Remove redundant module unref
Browse files Browse the repository at this point in the history
For unmanaged modules, p11_module_release_inlock_reentrant simply
decrease the reference count.  However, it should have been
incremented only if initialize_module_inlock_reentrant call above
succeeds.
  • Loading branch information
ueno committed Jan 28, 2021
1 parent 2641222 commit 96316db
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion p11-kit/modules.c
Original file line number Diff line number Diff line change
Expand Up @@ -2408,7 +2408,6 @@ p11_kit_initialize_module (CK_FUNCTION_LIST_PTR module)
rv = initialize_module_inlock_reentrant (mod, NULL);
if (rv != CKR_OK) {
p11_message ("module initialization failed: %s", p11_kit_strerror (rv));
p11_module_release_inlock_reentrant (module);
}
}

Expand Down

0 comments on commit 96316db

Please sign in to comment.