aboutsummaryrefslogtreecommitdiff
path: root/openssl/crypto/asn1/x_name.c
diff options
context:
space:
mode:
Diffstat (limited to 'openssl/crypto/asn1/x_name.c')
-rw-r--r--openssl/crypto/asn1/x_name.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/openssl/crypto/asn1/x_name.c b/openssl/crypto/asn1/x_name.c
index caa4409fe..49be08b4d 100644
--- a/openssl/crypto/asn1/x_name.c
+++ b/openssl/crypto/asn1/x_name.c
@@ -214,7 +214,9 @@ static int x509_name_ex_d2i(ASN1_VALUE **val,
*val = nm.a;
*in = p;
return ret;
- err:
+err:
+ if (nm.x != NULL)
+ X509_NAME_free(nm.x);
ASN1err(ASN1_F_X509_NAME_EX_D2I, ERR_R_NESTED_ASN1_ERROR);
return 0;
}
@@ -464,7 +466,8 @@ static int asn1_string_canon(ASN1_STRING *out, ASN1_STRING *in)
}
else
{
- *to++ = tolower(*from++);
+ *to++ = tolower(*from);
+ from++;
i++;
}
}