aboutsummaryrefslogtreecommitdiff
path: root/crypto/asn1/x_pubkey.c
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2002-04-20 10:19:20 +0000
committerRichard Levitte <levitte@openssl.org>2002-04-20 10:19:20 +0000
commit2d7ab7e9ea611de3cd2944934a468c2b0218f0cc (patch)
treebd19e70386def580c57d07fb4dd4bbb87a954b91 /crypto/asn1/x_pubkey.c
parent6176df94ed4a8c217546ac31d11d4d72140df3f5 (diff)
downloadopenssl-2d7ab7e9ea611de3cd2944934a468c2b0218f0cc.zip
openssl-2d7ab7e9ea611de3cd2944934a468c2b0218f0cc.tar.gz
openssl-2d7ab7e9ea611de3cd2944934a468c2b0218f0cc.tar.bz2
Do not free p if it hasn't been used yet.
Notified by Bernd Matthes <bernd.matthes@gemplus.com>
Diffstat (limited to 'crypto/asn1/x_pubkey.c')
-rw-r--r--crypto/asn1/x_pubkey.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/crypto/asn1/x_pubkey.c b/crypto/asn1/x_pubkey.c
index a34f473..f1ddbf0 100644
--- a/crypto/asn1/x_pubkey.c
+++ b/crypto/asn1/x_pubkey.c
@@ -85,7 +85,7 @@ int X509_PUBKEY_set(X509_PUBKEY **x, EVP_PKEY *pkey)
X509_PUBKEY *pk;
X509_ALGOR *a;
ASN1_OBJECT *o;
- unsigned char *s,*p;
+ unsigned char *s,*p = NULL;
int i;
if (x == NULL) return(0);
@@ -142,7 +142,6 @@ int X509_PUBKEY_set(X509_PUBKEY **x, EVP_PKEY *pkey)
if ((a->parameter = ASN1_TYPE_new()) == NULL)
{
X509err(X509_F_X509_PUBKEY_SET, ERR_R_ASN1_LIB);
- OPENSSL_free(p);
goto err;
}