summaryrefslogtreecommitdiff
path: root/p11-kit
diff options
context:
space:
mode:
authorPankaj <pankaj.s01@samsung.com>2016-01-05 09:52:00 +0000
committerStef Walter <stefw@redhat.com>2016-01-05 10:54:57 +0100
commit6c4ef3f492d88acca931174519b7aa1215cc1a18 (patch)
tree23ebeaa3133c225e6f24f7643207491e2cf4c82b /p11-kit
parent5f6cc6c4c66050069d0db93006299cde44920559 (diff)
Avoiding redundant check
https://bugs.freedesktop.org/show_bug.cgi?id=93587
Diffstat (limited to 'p11-kit')
-rw-r--r--p11-kit/modules.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/p11-kit/modules.c b/p11-kit/modules.c
index acb3707..63baeb1 100644
--- a/p11-kit/modules.c
+++ b/p11-kit/modules.c
@@ -2326,17 +2326,15 @@ p11_module_load_inlock_reentrant (CK_FUNCTION_LIST *module,
}
/* If this was newly allocated, add it to the list */
- if (rv == CKR_OK && allocated) {
+ if (allocated) {
if (!p11_dict_set (gl.modules, allocated, allocated) ||
!p11_dict_set (gl.unmanaged_by_funcs, module, allocated))
return_val_if_reached (CKR_HOST_MEMORY);
allocated = NULL;
}
- if (rv == CKR_OK) {
/* WARNING: Reentrancy can occur here */
rv = prepare_module_inlock_reentrant (mod, flags, result);
- }
free (allocated);
}