kx509: Prevent double free
Patchset 750a09bca2
introduced the
potential for a double free of 'name'.
Change-Id: I23bd4ddb7d9b41cbb3948ab06245f4052b309971
This commit is contained in:
@@ -161,8 +161,6 @@ build_certificate(krb5_context context,
|
|||||||
if (ret)
|
if (ret)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
krb5_xfree(name);
|
|
||||||
|
|
||||||
{
|
{
|
||||||
hx509_certs certs;
|
hx509_certs certs;
|
||||||
hx509_query *q;
|
hx509_query *q;
|
||||||
@@ -264,6 +262,9 @@ build_certificate(krb5_context context,
|
|||||||
if (ret)
|
if (ret)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
|
/* cleanup on success */
|
||||||
|
krb5_xfree(name);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
out:
|
out:
|
||||||
if (name)
|
if (name)
|
||||||
|
Reference in New Issue
Block a user