kx509: Prevent double free

Patchset 750a09bca2 introduced the
potential for a double free of 'name'.

Change-Id: I23bd4ddb7d9b41cbb3948ab06245f4052b309971
This commit is contained in:
Jeffrey Altman
2013-12-04 14:21:56 -05:00
parent b20e7fa4d0
commit ad995f9b69

View File

@@ -161,8 +161,6 @@ build_certificate(krb5_context context,
if (ret)
goto out;
krb5_xfree(name);
{
hx509_certs certs;
hx509_query *q;
@@ -264,6 +262,9 @@ build_certificate(krb5_context context,
if (ret)
goto out;
/* cleanup on success */
krb5_xfree(name);
return 0;
out:
if (name)