projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
use unit64_t for CPUID and timestamp code
[openssl.git]
/
crypto
/
ex_data.c
diff --git
a/crypto/ex_data.c
b/crypto/ex_data.c
index d55985ba0aed6d5a6baacd5a06f68018a5a4a3a4..20a2dd732447ad6c2cac5b9c4748cc976bad3f3d 100644
(file)
--- a/
crypto/ex_data.c
+++ b/
crypto/ex_data.c
@@
-318,7
+318,7
@@
static EX_CLASS_ITEM *def_get_class(int class_index)
CRYPTO_w_lock(CRYPTO_LOCK_EX_DATA);
p = lh_EX_CLASS_ITEM_retrieve(ex_data, &d);
if (!p) {
CRYPTO_w_lock(CRYPTO_LOCK_EX_DATA);
p = lh_EX_CLASS_ITEM_retrieve(ex_data, &d);
if (!p) {
- gen = OPENSSL_malloc(sizeof(
EX_CLASS_ITEM
));
+ gen = OPENSSL_malloc(sizeof(
*gen
));
if (gen) {
gen->class_index = class_index;
gen->meth_num = 0;
if (gen) {
gen->class_index = class_index;
gen->meth_num = 0;
@@
-350,8
+350,7
@@
static int def_add_index(EX_CLASS_ITEM *item, long argl, void *argp,
CRYPTO_EX_free *free_func)
{
int toret = -1;
CRYPTO_EX_free *free_func)
{
int toret = -1;
- CRYPTO_EX_DATA_FUNCS *a =
- (CRYPTO_EX_DATA_FUNCS *)OPENSSL_malloc(sizeof(CRYPTO_EX_DATA_FUNCS));
+ CRYPTO_EX_DATA_FUNCS *a = OPENSSL_malloc(sizeof(*a));
if (!a) {
CRYPTOerr(CRYPTO_F_DEF_ADD_INDEX, ERR_R_MALLOC_FAILURE);
return -1;
if (!a) {
CRYPTOerr(CRYPTO_F_DEF_ADD_INDEX, ERR_R_MALLOC_FAILURE);
return -1;
@@
-445,8
+444,7
@@
static int int_new_ex_data(int class_index, void *obj, CRYPTO_EX_DATA *ad)
storage[i]->argl, storage[i]->argp);
}
}
storage[i]->argl, storage[i]->argp);
}
}
- if (storage)
- OPENSSL_free(storage);
+ OPENSSL_free(storage);
return 1;
}
return 1;
}
@@
-488,8
+486,7
@@
static int int_dup_ex_data(int class_index, CRYPTO_EX_DATA *to,
storage[i]->argl, storage[i]->argp);
CRYPTO_set_ex_data(to, i, ptr);
}
storage[i]->argl, storage[i]->argp);
CRYPTO_set_ex_data(to, i, ptr);
}
- if (storage)
- OPENSSL_free(storage);
+ OPENSSL_free(storage);
return 1;
}
return 1;
}
@@
-526,12
+523,9
@@
static void int_free_ex_data(int class_index, void *obj, CRYPTO_EX_DATA *ad)
storage[i]->argl, storage[i]->argp);
}
}
storage[i]->argl, storage[i]->argp);
}
}
- if (storage)
- OPENSSL_free(storage);
- if (ad->sk) {
- sk_void_free(ad->sk);
- ad->sk = NULL;
- }
+ OPENSSL_free(storage);
+ sk_void_free(ad->sk);
+ ad->sk = NULL;
}
/********************************************************************/
}
/********************************************************************/