Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor code cleanup in o_names_init #17238

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 7 additions & 1 deletion crypto/objects/o_names.c
Expand Up @@ -66,8 +66,14 @@ static int obj_name_cmp(const OBJ_NAME *a, const OBJ_NAME *b);
static CRYPTO_ONCE init = CRYPTO_ONCE_STATIC_INIT;
DEFINE_RUN_ONCE_STATIC(o_names_init)
{
names_lh = lh_OBJ_NAME_new(obj_name_hash, obj_name_cmp);
names_lh = NULL;
obj_lock = CRYPTO_THREAD_lock_new();
if (obj_lock != NULL)
paulidale marked this conversation as resolved.
Show resolved Hide resolved
names_lh = lh_OBJ_NAME_new(obj_name_hash, obj_name_cmp);
if (names_lh == NULL) {
CRYPTO_THREAD_lock_free(obj_lock);
obj_lock = NULL;
}
return names_lh != NULL && obj_lock != NULL;
}

Expand Down