diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2016-05-10 21:55:07 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2016-05-10 21:55:07 +0200 |
commit | 083697ecf6cfc336ddf2fe89b76feea95f369bd2 (patch) | |
tree | dfb0cb380b0c7e05021fbc1a7358d4863e02450c | |
parent | 848c1e27f8a33fe9b77d5e0fb0e17ffe2b71d326 (diff) | |
download | gnutls-083697ecf6cfc336ddf2fe89b76feea95f369bd2.tar.gz |
_gnutls_krb5_der_to_principal: fixed invalid deinitialization on cleanup
-rw-r--r-- | lib/x509/krb5.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/x509/krb5.c b/lib/x509/krb5.c index 45b71ba2b9..49096c1e1a 100644 --- a/lib/x509/krb5.c +++ b/lib/x509/krb5.c @@ -283,6 +283,8 @@ int _gnutls_krb5_der_to_principal(const gnutls_datum * der, gnutls_datum_t *name ASN1_TYPE c2 = ASN1_TYPE_EMPTY; gnutls_buffer_st str; + _gnutls_buffer_init(&str); + result = asn1_create_element(_gnutls_get_gnutls_asn(), "GNUTLS.KRB5PrincipalName", &c2); if (result != ASN1_SUCCESS) { gnutls_assert(); @@ -297,8 +299,6 @@ int _gnutls_krb5_der_to_principal(const gnutls_datum * der, gnutls_datum_t *name goto cleanup; } - _gnutls_buffer_init(&str); - ret = principal_to_str(c2, &str); if (ret < 0) { /* for some reason we cannot convert to a human readable string |