From b548a1f11c06ccdfa4f52a539912d22d77ee309e Mon Sep 17 00:00:00 2001 From: Rich Salz Date: Fri, 1 May 2015 10:02:07 -0400 Subject: free null cleanup finale Don't check for NULL before calling OPENSSL_free Reviewed-by: Richard Levitte --- crypto/asn1/a_sign.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'crypto/asn1/a_sign.c') 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; -- cgit v1.2.3