diff options
Diffstat (limited to 'lib/libcrypto/asn1/x_pubkey.c')
-rw-r--r-- | lib/libcrypto/asn1/x_pubkey.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/libcrypto/asn1/x_pubkey.c b/lib/libcrypto/asn1/x_pubkey.c index df915e2dfd0..f8b22fc3723 100644 --- a/lib/libcrypto/asn1/x_pubkey.c +++ b/lib/libcrypto/asn1/x_pubkey.c @@ -355,8 +355,7 @@ X509_PUBKEY_set0_param(X509_PUBKEY *pub, ASN1_OBJECT *aobj, int ptype, if (!X509_ALGOR_set0(pub->algor, aobj, ptype, pval)) return 0; if (penc) { - if (pub->public_key->data) - free(pub->public_key->data); + free(pub->public_key->data); pub->public_key->data = penc; pub->public_key->length = penclen; /* Set number of unused bits to zero */ |