diff options
author | Geoff Thorpe <geoff@openssl.org> | 2003-11-10 18:05:22 +0000 |
---|---|---|
committer | Geoff Thorpe <geoff@openssl.org> | 2003-11-10 18:05:22 +0000 |
commit | f7a397cc8d0cf336907a7e05f7a9a94c3cd12877 (patch) | |
tree | 5905b98aeebcd094ea5e0de5b451404c26dfe6d2 /crypto/asn1/x_pubkey.c | |
parent | cd2e8a6f2da1d5a8e842f71511c68d1088629912 (diff) | |
download | openssl-f7a397cc8d0cf336907a7e05f7a9a94c3cd12877.zip openssl-f7a397cc8d0cf336907a7e05f7a9a94c3cd12877.tar.gz openssl-f7a397cc8d0cf336907a7e05f7a9a94c3cd12877.tar.bz2 |
Avoid possible memory leaks in error-handling.
Submitted by: Nils Larsch
Reviewed by: Geoff Thorpe
Diffstat (limited to 'crypto/asn1/x_pubkey.c')
-rw-r--r-- | crypto/asn1/x_pubkey.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/asn1/x_pubkey.c b/crypto/asn1/x_pubkey.c index c32a6ea..01698dd 100644 --- a/crypto/asn1/x_pubkey.c +++ b/crypto/asn1/x_pubkey.c @@ -323,7 +323,7 @@ EVP_PKEY *X509_PUBKEY_get(X509_PUBKEY *key) p=key->public_key->data; j=key->public_key->length; - if ((ret = d2i_PublicKey(type, &ret, &p, (long)j)) == NULL) + if (!d2i_PublicKey(type, &ret, &p, (long)j)) { X509err(X509_F_X509_PUBKEY_GET, X509_R_ERR_ASN1_LIB); goto err; |