diff options
author | Rich Salz <rsalz@openssl.org> | 2015-05-01 16:02:07 +0200 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2015-05-01 16:02:07 +0200 |
commit | b548a1f11c06ccdfa4f52a539912d22d77ee309e (patch) | |
tree | 37ff8792ddf09e4805aa3ba76b805923d3c52734 /crypto/asn1/a_sign.c | |
parent | Fix some typo's, silence warnings. (diff) | |
download | openssl-b548a1f11c06ccdfa4f52a539912d22d77ee309e.tar.xz openssl-b548a1f11c06ccdfa4f52a539912d22d77ee309e.zip |
free null cleanup finale
Don't check for NULL before calling OPENSSL_free
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'crypto/asn1/a_sign.c')
-rw-r--r-- | crypto/asn1/a_sign.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/crypto/asn1/a_sign.c b/crypto/asn1/a_sign.c index fb7536d84e..e189958174 100644 --- a/crypto/asn1/a_sign.c +++ b/crypto/asn1/a_sign.c @@ -190,8 +190,7 @@ int ASN1_sign(i2d_of_void *i2d, X509_ALGOR *algor1, X509_ALGOR *algor2, ASN1err(ASN1_F_ASN1_SIGN, ERR_R_EVP_LIB); goto err; } - if (signature->data != NULL) - OPENSSL_free(signature->data); + OPENSSL_free(signature->data); signature->data = buf_out; buf_out = NULL; signature->length = outl; @@ -300,8 +299,7 @@ int ASN1_item_sign_ctx(const ASN1_ITEM *it, ASN1err(ASN1_F_ASN1_ITEM_SIGN_CTX, ERR_R_EVP_LIB); goto err; } - if (signature->data != NULL) - OPENSSL_free(signature->data); + OPENSSL_free(signature->data); signature->data = buf_out; buf_out = NULL; signature->length = outl; |