diff options
Diffstat (limited to 'src/lib/libcrypto/dsa/dsa_ameth.c')
-rw-r--r-- | src/lib/libcrypto/dsa/dsa_ameth.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/libcrypto/dsa/dsa_ameth.c b/src/lib/libcrypto/dsa/dsa_ameth.c index 376156ec5e..e9c549802d 100644 --- a/src/lib/libcrypto/dsa/dsa_ameth.c +++ b/src/lib/libcrypto/dsa/dsa_ameth.c | |||
@@ -176,7 +176,7 @@ static int dsa_pub_encode(X509_PUBKEY *pk, const EVP_PKEY *pkey) | |||
176 | 176 | ||
177 | err: | 177 | err: |
178 | if (penc) | 178 | if (penc) |
179 | OPENSSL_free(penc); | 179 | free(penc); |
180 | if (pval) | 180 | if (pval) |
181 | ASN1_STRING_free(pval); | 181 | ASN1_STRING_free(pval); |
182 | 182 | ||
@@ -344,7 +344,7 @@ static int dsa_priv_encode(PKCS8_PRIV_KEY_INFO *p8, const EVP_PKEY *pkey) | |||
344 | 344 | ||
345 | err: | 345 | err: |
346 | if (dp != NULL) | 346 | if (dp != NULL) |
347 | OPENSSL_free(dp); | 347 | free(dp); |
348 | if (params != NULL) | 348 | if (params != NULL) |
349 | ASN1_STRING_free(params); | 349 | ASN1_STRING_free(params); |
350 | if (prkey != NULL) | 350 | if (prkey != NULL) |
@@ -459,7 +459,7 @@ static int do_dsa_print(BIO *bp, const DSA *x, int off, int ptype) | |||
459 | update_buflen(priv_key, &buf_len); | 459 | update_buflen(priv_key, &buf_len); |
460 | update_buflen(pub_key, &buf_len); | 460 | update_buflen(pub_key, &buf_len); |
461 | 461 | ||
462 | m=(unsigned char *)OPENSSL_malloc(buf_len+10); | 462 | m=(unsigned char *)malloc(buf_len+10); |
463 | if (m == NULL) | 463 | if (m == NULL) |
464 | { | 464 | { |
465 | DSAerr(DSA_F_DO_DSA_PRINT,ERR_R_MALLOC_FAILURE); | 465 | DSAerr(DSA_F_DO_DSA_PRINT,ERR_R_MALLOC_FAILURE); |
@@ -483,7 +483,7 @@ static int do_dsa_print(BIO *bp, const DSA *x, int off, int ptype) | |||
483 | if (!ASN1_bn_print(bp,"G: ",x->g,m,off)) goto err; | 483 | if (!ASN1_bn_print(bp,"G: ",x->g,m,off)) goto err; |
484 | ret=1; | 484 | ret=1; |
485 | err: | 485 | err: |
486 | if (m != NULL) OPENSSL_free(m); | 486 | if (m != NULL) free(m); |
487 | return(ret); | 487 | return(ret); |
488 | } | 488 | } |
489 | 489 | ||
@@ -564,7 +564,7 @@ static int dsa_sig_print(BIO *bp, const X509_ALGOR *sigalg, | |||
564 | unsigned char *m=NULL; | 564 | unsigned char *m=NULL; |
565 | update_buflen(dsa_sig->r, &buf_len); | 565 | update_buflen(dsa_sig->r, &buf_len); |
566 | update_buflen(dsa_sig->s, &buf_len); | 566 | update_buflen(dsa_sig->s, &buf_len); |
567 | m = OPENSSL_malloc(buf_len+10); | 567 | m = malloc(buf_len+10); |
568 | if (m == NULL) | 568 | if (m == NULL) |
569 | { | 569 | { |
570 | DSAerr(DSA_F_DSA_SIG_PRINT,ERR_R_MALLOC_FAILURE); | 570 | DSAerr(DSA_F_DSA_SIG_PRINT,ERR_R_MALLOC_FAILURE); |
@@ -581,7 +581,7 @@ static int dsa_sig_print(BIO *bp, const X509_ALGOR *sigalg, | |||
581 | rv = 1; | 581 | rv = 1; |
582 | err: | 582 | err: |
583 | if (m) | 583 | if (m) |
584 | OPENSSL_free(m); | 584 | free(m); |
585 | DSA_SIG_free(dsa_sig); | 585 | DSA_SIG_free(dsa_sig); |
586 | return rv; | 586 | return rv; |
587 | } | 587 | } |