diff options
Diffstat (limited to 'crypto/asn1')
-rw-r--r-- | crypto/asn1/a_object.c | 2 | ||||
-rw-r--r-- | crypto/asn1/a_strnid.c | 2 | ||||
-rw-r--r-- | crypto/asn1/ameth_lib.c | 2 | ||||
-rw-r--r-- | crypto/asn1/asn1_lib.c | 2 | ||||
-rw-r--r-- | crypto/asn1/asn_mime.c | 4 | ||||
-rw-r--r-- | crypto/asn1/bio_asn1.c | 2 | ||||
-rw-r--r-- | crypto/asn1/bio_ndef.c | 2 | ||||
-rw-r--r-- | crypto/asn1/tasn_new.c | 2 | ||||
-rw-r--r-- | crypto/asn1/tasn_prn.c | 2 | ||||
-rw-r--r-- | crypto/asn1/tasn_scn.c | 2 | ||||
-rw-r--r-- | crypto/asn1/x_crl.c | 2 | ||||
-rw-r--r-- | crypto/asn1/x_info.c | 2 | ||||
-rw-r--r-- | crypto/asn1/x_pkey.c | 4 |
13 files changed, 15 insertions, 15 deletions
diff --git a/crypto/asn1/a_object.c b/crypto/asn1/a_object.c index 809e9a4112..7cedce82e7 100644 --- a/crypto/asn1/a_object.c +++ b/crypto/asn1/a_object.c @@ -345,7 +345,7 @@ ASN1_OBJECT *ASN1_OBJECT_new(void) { ASN1_OBJECT *ret; - ret = OPENSSL_malloc(sizeof(ASN1_OBJECT)); + ret = OPENSSL_malloc(sizeof(*ret)); if (ret == NULL) { ASN1err(ASN1_F_ASN1_OBJECT_NEW, ERR_R_MALLOC_FAILURE); return (NULL); diff --git a/crypto/asn1/a_strnid.c b/crypto/asn1/a_strnid.c index 5126298673..071613b89b 100644 --- a/crypto/asn1/a_strnid.c +++ b/crypto/asn1/a_strnid.c @@ -240,7 +240,7 @@ static ASN1_STRING_TABLE *stable_get(int nid) tmp = ASN1_STRING_TABLE_get(nid); if (tmp && tmp->flags & STABLE_FLAGS_MALLOC) return tmp; - rv = OPENSSL_malloc(sizeof(ASN1_STRING_TABLE)); + rv = OPENSSL_malloc(sizeof(*rv)); if (!rv) return NULL; if (!sk_ASN1_STRING_TABLE_push(stable, rv)) { diff --git a/crypto/asn1/ameth_lib.c b/crypto/asn1/ameth_lib.c index 49f4e5abbf..c7acb468a6 100644 --- a/crypto/asn1/ameth_lib.c +++ b/crypto/asn1/ameth_lib.c @@ -284,7 +284,7 @@ EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_new(int id, int flags, const char *pem_str, const char *info) { EVP_PKEY_ASN1_METHOD *ameth; - ameth = OPENSSL_malloc(sizeof(EVP_PKEY_ASN1_METHOD)); + ameth = OPENSSL_malloc(sizeof(*ameth)); if (!ameth) return NULL; diff --git a/crypto/asn1/asn1_lib.c b/crypto/asn1/asn1_lib.c index e1e509b3ec..bda6ab09b4 100644 --- a/crypto/asn1/asn1_lib.c +++ b/crypto/asn1/asn1_lib.c @@ -349,7 +349,7 @@ ASN1_STRING *ASN1_STRING_type_new(int type) { ASN1_STRING *ret; - ret = OPENSSL_malloc(sizeof(ASN1_STRING)); + ret = OPENSSL_malloc(sizeof(*ret)); if (ret == NULL) { ASN1err(ASN1_F_ASN1_STRING_TYPE_NEW, ERR_R_MALLOC_FAILURE); return (NULL); diff --git a/crypto/asn1/asn_mime.c b/crypto/asn1/asn_mime.c index e8411a82ad..da5b417048 100644 --- a/crypto/asn1/asn_mime.c +++ b/crypto/asn1/asn_mime.c @@ -844,7 +844,7 @@ static MIME_HEADER *mime_hdr_new(char *name, char *value) } } } - mhdr = OPENSSL_malloc(sizeof(MIME_HEADER)); + mhdr = OPENSSL_malloc(sizeof(*mhdr)); if (!mhdr) goto err; mhdr->name = tmpname; @@ -883,7 +883,7 @@ static int mime_hdr_addparam(MIME_HEADER *mhdr, char *name, char *value) goto err; } /* Parameter values are case sensitive so leave as is */ - mparam = OPENSSL_malloc(sizeof(MIME_PARAM)); + mparam = OPENSSL_malloc(sizeof(*mparam)); if (!mparam) goto err; mparam->param_name = tmpname; diff --git a/crypto/asn1/bio_asn1.c b/crypto/asn1/bio_asn1.c index ba39069374..910d06f04d 100644 --- a/crypto/asn1/bio_asn1.c +++ b/crypto/asn1/bio_asn1.c @@ -146,7 +146,7 @@ BIO_METHOD *BIO_f_asn1(void) static int asn1_bio_new(BIO *b) { BIO_ASN1_BUF_CTX *ctx; - ctx = OPENSSL_malloc(sizeof(BIO_ASN1_BUF_CTX)); + ctx = OPENSSL_malloc(sizeof(*ctx)); if (!ctx) return 0; if (!asn1_bio_init(ctx, DEFAULT_ASN1_BUF_SIZE)) { diff --git a/crypto/asn1/bio_ndef.c b/crypto/asn1/bio_ndef.c index de517f22e4..ff2fdf529b 100644 --- a/crypto/asn1/bio_ndef.c +++ b/crypto/asn1/bio_ndef.c @@ -106,7 +106,7 @@ BIO *BIO_new_NDEF(BIO *out, ASN1_VALUE *val, const ASN1_ITEM *it) ASN1err(ASN1_F_BIO_NEW_NDEF, ASN1_R_STREAMING_NOT_SUPPORTED); return NULL; } - ndef_aux = OPENSSL_malloc(sizeof(NDEF_SUPPORT)); + ndef_aux = OPENSSL_malloc(sizeof(*ndef_aux)); asn_bio = BIO_new(BIO_f_asn1()); /* ASN1 bio needs to be next to output BIO */ diff --git a/crypto/asn1/tasn_new.c b/crypto/asn1/tasn_new.c index aeced95232..f54bd9bcf1 100644 --- a/crypto/asn1/tasn_new.c +++ b/crypto/asn1/tasn_new.c @@ -319,7 +319,7 @@ static int asn1_primitive_new(ASN1_VALUE **pval, const ASN1_ITEM *it) return 1; case V_ASN1_ANY: - typ = OPENSSL_malloc(sizeof(ASN1_TYPE)); + typ = OPENSSL_malloc(sizeof(*typ)); if (!typ) return 0; typ->value.ptr = NULL; diff --git a/crypto/asn1/tasn_prn.c b/crypto/asn1/tasn_prn.c index 76d584b2ba..e080e724a4 100644 --- a/crypto/asn1/tasn_prn.c +++ b/crypto/asn1/tasn_prn.c @@ -85,7 +85,7 @@ ASN1_PCTX default_pctx = { ASN1_PCTX *ASN1_PCTX_new(void) { ASN1_PCTX *ret; - ret = OPENSSL_malloc(sizeof(ASN1_PCTX)); + ret = OPENSSL_malloc(sizeof(*ret)); if (ret == NULL) { ASN1err(ASN1_F_ASN1_PCTX_NEW, ERR_R_MALLOC_FAILURE); return NULL; diff --git a/crypto/asn1/tasn_scn.c b/crypto/asn1/tasn_scn.c index cedea9cb78..43a125cb55 100644 --- a/crypto/asn1/tasn_scn.c +++ b/crypto/asn1/tasn_scn.c @@ -75,7 +75,7 @@ ASN1_SCTX *ASN1_SCTX_new(int (*scan_cb) (ASN1_SCTX *ctx)) { ASN1_SCTX *ret; - ret = OPENSSL_malloc(sizeof(ASN1_SCTX)); + ret = OPENSSL_malloc(sizeof(*ret)); if (ret == NULL) { ASN1err(ASN1_F_ASN1_SCTX_NEW, ERR_R_MALLOC_FAILURE); return NULL; diff --git a/crypto/asn1/x_crl.c b/crypto/asn1/x_crl.c index a32158b983..0d759beb6d 100644 --- a/crypto/asn1/x_crl.c +++ b/crypto/asn1/x_crl.c @@ -476,7 +476,7 @@ X509_CRL_METHOD *X509_CRL_METHOD_new(int (*crl_init) (X509_CRL *crl), EVP_PKEY *pk)) { X509_CRL_METHOD *m; - m = OPENSSL_malloc(sizeof(X509_CRL_METHOD)); + m = OPENSSL_malloc(sizeof(*m)); if (!m) return NULL; m->crl_init = crl_init; diff --git a/crypto/asn1/x_info.c b/crypto/asn1/x_info.c index 5b927efc67..856bcf58b2 100644 --- a/crypto/asn1/x_info.c +++ b/crypto/asn1/x_info.c @@ -66,7 +66,7 @@ X509_INFO *X509_INFO_new(void) { X509_INFO *ret = NULL; - ret = OPENSSL_malloc(sizeof(X509_INFO)); + ret = OPENSSL_malloc(sizeof(*ret)); if (ret == NULL) { ASN1err(ASN1_F_X509_INFO_NEW, ERR_R_MALLOC_FAILURE); return (NULL); diff --git a/crypto/asn1/x_pkey.c b/crypto/asn1/x_pkey.c index 59e002bd45..b01616fb8d 100644 --- a/crypto/asn1/x_pkey.c +++ b/crypto/asn1/x_pkey.c @@ -66,10 +66,10 @@ X509_PKEY *X509_PKEY_new(void) { X509_PKEY *ret = NULL; - ret = OPENSSL_malloc(sizeof(X509_PKEY)); + ret = OPENSSL_malloc(sizeof(*ret)); if (!ret) goto err; - memset(ret, 0, sizeof(X509_PKEY)); + memset(ret, 0, sizeof(*ret)); ret->version = 0; ret->enc_algor = X509_ALGOR_new(); |