diff options
Diffstat (limited to 'src/lib/libcrypto/asn1/a_sign.c')
-rw-r--r-- | src/lib/libcrypto/asn1/a_sign.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/libcrypto/asn1/a_sign.c b/src/lib/libcrypto/asn1/a_sign.c index 01b6292b65..0433b49a64 100644 --- a/src/lib/libcrypto/asn1/a_sign.c +++ b/src/lib/libcrypto/asn1/a_sign.c | |||
@@ -211,7 +211,7 @@ int ASN1_item_sign_ctx(const ASN1_ITEM *it, | |||
211 | 211 | ||
212 | inl=ASN1_item_i2d(asn,&buf_in, it); | 212 | inl=ASN1_item_i2d(asn,&buf_in, it); |
213 | outll=outl=EVP_PKEY_size(pkey); | 213 | outll=outl=EVP_PKEY_size(pkey); |
214 | buf_out=OPENSSL_malloc((unsigned int)outl); | 214 | buf_out=malloc((unsigned int)outl); |
215 | if ((buf_in == NULL) || (buf_out == NULL)) | 215 | if ((buf_in == NULL) || (buf_out == NULL)) |
216 | { | 216 | { |
217 | outl=0; | 217 | outl=0; |
@@ -226,7 +226,7 @@ int ASN1_item_sign_ctx(const ASN1_ITEM *it, | |||
226 | ASN1err(ASN1_F_ASN1_ITEM_SIGN_CTX,ERR_R_EVP_LIB); | 226 | ASN1err(ASN1_F_ASN1_ITEM_SIGN_CTX,ERR_R_EVP_LIB); |
227 | goto err; | 227 | goto err; |
228 | } | 228 | } |
229 | if (signature->data != NULL) OPENSSL_free(signature->data); | 229 | if (signature->data != NULL) free(signature->data); |
230 | signature->data=buf_out; | 230 | signature->data=buf_out; |
231 | buf_out=NULL; | 231 | buf_out=NULL; |
232 | signature->length=outl; | 232 | signature->length=outl; |
@@ -238,8 +238,8 @@ int ASN1_item_sign_ctx(const ASN1_ITEM *it, | |||
238 | err: | 238 | err: |
239 | EVP_MD_CTX_cleanup(ctx); | 239 | EVP_MD_CTX_cleanup(ctx); |
240 | if (buf_in != NULL) | 240 | if (buf_in != NULL) |
241 | { OPENSSL_cleanse((char *)buf_in,(unsigned int)inl); OPENSSL_free(buf_in); } | 241 | { OPENSSL_cleanse((char *)buf_in,(unsigned int)inl); free(buf_in); } |
242 | if (buf_out != NULL) | 242 | if (buf_out != NULL) |
243 | { OPENSSL_cleanse((char *)buf_out,outll); OPENSSL_free(buf_out); } | 243 | { OPENSSL_cleanse((char *)buf_out,outll); free(buf_out); } |
244 | return(outl); | 244 | return(outl); |
245 | } | 245 | } |